pub struct Operation<E = ()> {
pub hash: Hash,
pub header: Header<E>,
pub body: Option<Body>,
}Fields§
§hash: Hash§header: Header<E>§body: Option<Body>Implementations§
Source§impl<E> Operation<E>where
E: Extensions,
impl<E> Operation<E>where
E: Extensions,
Sourcepub fn from_parts(header: Header<E>, body: Option<Body>) -> Self
pub fn from_parts(header: Header<E>, body: Option<Body>) -> Self
Assembles an operation from it’s header and optional body parts.
Please note that this method does not verify if the given body belongs to the header. Use
validate_operation if in doubt.
Trait Implementations§
Source§impl<E> Chain<Hash> for Operation<E>
impl<E> Chain<Hash> for Operation<E>
impl<E> Eq for Operation<E>
Source§impl<E> Offchain<Hash> for Operation<E>
impl<E> Offchain<Hash> for Operation<E>
Source§fn payload_hash(&self) -> Option<Hash>
fn payload_hash(&self) -> Option<Hash>
Hash digest of the payload.
Source§fn payload_size(&self) -> PayloadSize
fn payload_size(&self) -> PayloadSize
Size in bytes of the payload.
Source§impl<E> Ord for Operation<E>
impl<E> Ord for Operation<E>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<E> PartialOrd for Operation<E>
impl<E> PartialOrd for Operation<E>
Source§impl<E> Provenance<VerifyingKey> for Operation<E>where
E: Extensions,
impl<E> Provenance<VerifyingKey> for Operation<E>where
E: Extensions,
Source§impl<E> TryFrom<AnyOperation> for Operation<E>where
E: Extensions,
impl<E> TryFrom<AnyOperation> for Operation<E>where
E: Extensions,
Source§type Error = HeaderError
type Error = HeaderError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl<E> Freeze for Operation<E>where
E: Freeze,
impl<E> RefUnwindSafe for Operation<E>where
E: RefUnwindSafe,
impl<E> Send for Operation<E>where
E: Send,
impl<E> Sync for Operation<E>where
E: Sync,
impl<E> Unpin for Operation<E>where
E: Unpin,
impl<E> UnsafeUnpin for Operation<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for Operation<E>where
E: UnwindSafe,
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