pub struct AnyOperation {
pub hash: Hash,
pub header: AnyHeader,
pub body: Option<Body>,
}Expand description
Combined AnyHeader, Body and operation Hash (Operation Id).
§Extensions
AnyOperation does not know the concrete extensions type. On this level it is only concerned
with the validity and integrity of the append-only log type itself which is enough for most
low-level protocols, such as the sync protocol.
Applications usually want to attach custom extensions to the operation, if you need to know the
type you can easily convert from AnyOperation to Operation with an
explicit E extensions type.
Fields§
§hash: Hash§header: AnyHeader§body: Option<Body>Trait Implementations§
Source§impl Chain<Hash> for AnyOperation
impl Chain<Hash> for AnyOperation
Source§impl Clone for AnyOperation
impl Clone for AnyOperation
Source§fn clone(&self) -> AnyOperation
fn clone(&self) -> AnyOperation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnyOperation
impl Debug for AnyOperation
Source§impl Digest<Hash> for AnyOperation
impl Digest<Hash> for AnyOperation
Source§impl Offchain<Hash> for AnyOperation
impl Offchain<Hash> for AnyOperation
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 Provenance<VerifyingKey> for AnyOperation
impl Provenance<VerifyingKey> for AnyOperation
Source§impl TryFrom<(Vec<u8>, Option<Vec<u8>>)> for AnyOperation
impl TryFrom<(Vec<u8>, Option<Vec<u8>>)> for AnyOperation
Source§type Error = HeaderError
type Error = HeaderError
The type returned in the event of a conversion error.
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 Freeze for AnyOperation
impl RefUnwindSafe for AnyOperation
impl Send for AnyOperation
impl Sync for AnyOperation
impl Unpin for AnyOperation
impl UnsafeUnpin for AnyOperation
impl UnwindSafe for AnyOperation
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