pub struct ArmRng;Expand description
Implement an interface for accessing Arm v8.5 RNG instructions.
An empty struct is used to confirm that the system has the instructions available.
§Example
use aarch64_cpu::asm::random::ArmRng;
if let Some(rng) = ArmRng::new() {
let rand_num = rng.rndr();
}Implementations§
Source§impl ArmRng
impl ArmRng
Sourcepub fn new() -> Option<ArmRng>
pub fn new() -> Option<ArmRng>
Return an empty object that is used to gate calling rndr and rndrss on discovery of the feature so each call doesn’t need to confirm it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ArmRng
impl RefUnwindSafe for ArmRng
impl Send for ArmRng
impl Sync for ArmRng
impl Unpin for ArmRng
impl UnwindSafe for ArmRng
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more