impl State { #[cfg(not(feature = "std"))] pubfn new(state: u32) -> Option<Self> { if cfg!(target_feature = "crc") { // SAFETY: The conditions above ensure that all // required instructions are supported by the CPU.
Some(Self { state })
} else {
None
}
}
#[cfg(feature = "std")] pubfn new(state: u32) -> Option<Self> { if std::arch::is_aarch64_feature_detected!("crc") { // SAFETY: The conditions above ensure that all // required instructions are supported by the CPU.
Some(Self { state })
} else {
None
}
}
pubfn update(&mutself, buf: &[u8]) { // SAFETY: The `State::new` constructor ensures that all // required instructions are supported by the CPU. self.state = unsafe { calculate(self.state, buf) }
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.