Struct bee_block::payload::tagged_data::TaggedDataPayload
source · [−]pub struct TaggedDataPayload { /* private fields */ }
Expand description
A payload which holds a tag and associated data.
Implementations
sourceimpl TaggedDataPayload
impl TaggedDataPayload
sourcepub const KIND: u32 = 5u32
pub const KIND: u32 = 5u32
The payload kind of a TaggedDataPayload
.
sourcepub const TAG_LENGTH_RANGE: RangeInclusive<u8> = _
pub const TAG_LENGTH_RANGE: RangeInclusive<u8> = _
Valid lengths for the tag.
sourcepub const DATA_LENGTH_RANGE: RangeInclusive<u32> = _
pub const DATA_LENGTH_RANGE: RangeInclusive<u32> = _
Valid lengths for the data.
sourcepub fn new(tag: Vec<u8>, data: Vec<u8>) -> Result<Self, Error>
pub fn new(tag: Vec<u8>, data: Vec<u8>) -> Result<Self, Error>
Creates a new TaggedDataPayload
.
Trait Implementations
sourceimpl Clone for TaggedDataPayload
impl Clone for TaggedDataPayload
sourcefn clone(&self) -> TaggedDataPayload
fn clone(&self) -> TaggedDataPayload
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TaggedDataPayload
impl Debug for TaggedDataPayload
sourceimpl<'de> Deserialize<'de> for TaggedDataPayload
impl<'de> Deserialize<'de> for TaggedDataPayload
sourcefn 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
sourceimpl From<&TaggedDataPayload> for TaggedDataPayloadDto
impl From<&TaggedDataPayload> for TaggedDataPayloadDto
sourcefn from(value: &TaggedDataPayload) -> Self
fn from(value: &TaggedDataPayload) -> Self
Converts to this type from the input type.
sourceimpl From<TaggedDataPayload> for Payload
impl From<TaggedDataPayload> for Payload
sourcefn from(payload: TaggedDataPayload) -> Self
fn from(payload: TaggedDataPayload) -> Self
Converts to this type from the input type.
sourceimpl Packable for TaggedDataPayload
impl Packable for TaggedDataPayload
type UnpackError = Error
type UnpackError = Error
The error type that can be returned if some semantic error occurs while unpacking. Read more
type UnpackVisitor = <BoxedSlicePrefix<u8, BoundedU8<{ *TaggedDataPayload::TAG_LENGTH_RANGE.start() }, { *TaggedDataPayload::TAG_LENGTH_RANGE.end() }>> as Packable>::UnpackVisitor
type UnpackVisitor = <BoxedSlicePrefix<u8, BoundedU8<{ *TaggedDataPayload::TAG_LENGTH_RANGE.start() }, { *TaggedDataPayload::TAG_LENGTH_RANGE.end() }>> as Packable>::UnpackVisitor
FIXME: docs
sourcefn pack<P: Packer>(&self, packer: &mut P) -> Result<(), P::Error>
fn pack<P: Packer>(&self, packer: &mut P) -> Result<(), P::Error>
Packs this value into the given Packer
.
sourcefn unpack<U: Unpacker, const VERIFY: bool>(
unpacker: &mut U,
visitor: &Self::UnpackVisitor
) -> Result<Self, UnpackError<Self::UnpackError, U::Error>>
fn unpack<U: Unpacker, const VERIFY: bool>(
unpacker: &mut U,
visitor: &Self::UnpackVisitor
) -> Result<Self, UnpackError<Self::UnpackError, U::Error>>
sourceimpl PartialEq<TaggedDataPayload> for TaggedDataPayload
impl PartialEq<TaggedDataPayload> for TaggedDataPayload
sourcefn eq(&self, other: &TaggedDataPayload) -> bool
fn eq(&self, other: &TaggedDataPayload) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for TaggedDataPayload
impl Serialize for TaggedDataPayload
sourceimpl TryFrom<&TaggedDataPayloadDto> for TaggedDataPayload
impl TryFrom<&TaggedDataPayloadDto> for TaggedDataPayload
impl Eq for TaggedDataPayload
impl StructuralEq for TaggedDataPayload
impl StructuralPartialEq for TaggedDataPayload
Auto Trait Implementations
impl RefUnwindSafe for TaggedDataPayload
impl Send for TaggedDataPayload
impl Sync for TaggedDataPayload
impl Unpin for TaggedDataPayload
impl UnwindSafe for TaggedDataPayload
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T
in a tonic::Request
sourceimpl<P> PackableExt for P where
P: Packable,
impl<P> PackableExt for P where
P: Packable,
sourcefn unpack_verified<T>(
bytes: T,
visitor: &<P as Packable>::UnpackVisitor
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>> where
T: AsRef<[u8]>,
fn unpack_verified<T>(
bytes: T,
visitor: &<P as Packable>::UnpackVisitor
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>> where
T: AsRef<[u8]>,
Unpacks this value from a type that implements [AsRef<[u8]>
].
sourcefn unpack_unverified<T>(
bytes: T
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>> where
T: AsRef<[u8]>,
fn unpack_unverified<T>(
bytes: T
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>> where
T: AsRef<[u8]>,
Unpacks this value from a type that implements [AsRef<[u8]>
] skipping some syntatical checks.
sourcefn packed_len(&self) -> usize
fn packed_len(&self) -> usize
Returns the length in bytes of the value after being packed. The returned value always matches the number of
bytes written using pack
. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more