pub struct RandomSeed { /* private fields */ }Implementations§
Source§impl RandomSeed
impl RandomSeed
Sourcepub const ADDRESS: Address
pub const ADDRESS: Address
Random bytes precompile address This is a per-block entropy source which could then be used to create a random sequence. It will return the same seed if called multiple time in the same block.
Address: 0xc104f4840573bed437190daf5d2898c2bdf928ac
This address is computed as: &keccak("randomSeed")[12..]
pub const fn new(random_seed: H256) -> Self
Trait Implementations§
Source§impl Precompile for RandomSeed
impl Precompile for RandomSeed
Auto Trait Implementations§
impl Freeze for RandomSeed
impl RefUnwindSafe for RandomSeed
impl Send for RandomSeed
impl Sync for RandomSeed
impl Unpin for RandomSeed
impl UnwindSafe for RandomSeed
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more