#[non_exhaustive]pub struct InherentData {
pub seed: u64,
pub timestamp: u64,
}
Expand description
Data inherent to an invocation. Meant to be supplied by a runtime, not a user.
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.seed: u64
The seed to associate with an invocation.
timestamp: u64
The timestamp to associate with an invocation.
Implementations§
Source§impl InherentData
impl InherentData
Sourcepub const fn new(seed: u64, timestamp: u64) -> Self
pub const fn new(seed: u64, timestamp: u64) -> Self
Constructor for InherentData
Sourcepub const fn unsafe_clone(&self) -> Self
pub const fn unsafe_clone(&self) -> Self
Clone the InherentData struct.
This is not “unsafe” in the Rust sense. It is unsafe because it should only be used if you are sure you know what you’re doing. If you don’t know why this is unsafe, don’t use it.
Trait Implementations§
Source§impl Debug for InherentData
impl Debug for InherentData
Source§impl<'de> Deserialize<'de> for InherentData
impl<'de> Deserialize<'de> for InherentData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for InherentData
impl PartialEq for InherentData
Source§impl Serialize for InherentData
impl Serialize for InherentData
impl StructuralPartialEq for InherentData
Auto Trait Implementations§
impl Freeze for InherentData
impl RefUnwindSafe for InherentData
impl Send for InherentData
impl Sync for InherentData
impl Unpin for InherentData
impl UnwindSafe for InherentData
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