#[non_exhaustive]pub struct InherentContext {
pub rng: Random,
pub timestamp: DateTime,
}
Expand description
Inherent data passed to an operation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.rng: Random
A random number generator initialized from the invocation seed.
timestamp: DateTime
The timestamp of the invocation.
Trait Implementations§
Source§impl Clone for InherentContext
impl Clone for InherentContext
Source§impl Debug for InherentContext
impl Debug for InherentContext
Source§impl From<InherentContext> for InherentData
impl From<InherentContext> for InherentData
Source§fn from(value: InherentContext) -> Self
fn from(value: InherentContext) -> Self
Converts to this type from the input type.
Source§impl From<InherentData> for InherentContext
impl From<InherentData> for InherentContext
Source§fn from(value: InherentData) -> Self
fn from(value: InherentData) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for InherentContext
impl !RefUnwindSafe for InherentContext
impl Send for InherentContext
impl Sync for InherentContext
impl Unpin for InherentContext
impl !UnwindSafe for InherentContext
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