pub struct Mesg {
pub parent_id: MesgId,
pub body: Vec<u8>,
pub container_ids: Vec<ContainerId>,
}
Expand description
Storm message data type
Fields§
§parent_id: MesgId
Parent message or topic ID.
body: Vec<u8>
Message body. The encoding of the body data and their semantics is storm application-specific.
container_ids: Vec<ContainerId>
Ids of the container attachments.
Implementations§
Trait Implementations§
Source§impl ConsensusCommit for Mesg
impl ConsensusCommit for Mesg
Source§type Commitment = MesgId
type Commitment = MesgId
Type of the resulting commitment
Source§fn consensus_commit(&self) -> Self::Commitment
fn consensus_commit(&self) -> Self::Commitment
Performs commitment to client-side-validated data
Source§fn consensus_verify(&self, commitment: &Self::Commitment) -> bool
fn consensus_verify(&self, commitment: &Self::Commitment) -> bool
Verifies commitment to client-side-validated data
Source§impl Ord for Mesg
impl Ord for Mesg
Source§impl PartialOrd for Mesg
impl PartialOrd for Mesg
Source§impl Strategy for Mesg
impl Strategy for Mesg
Source§type Strategy = UsingStrict
type Strategy = UsingStrict
Specific strategy. List of supported strategies: Read more
Source§impl StrictDecode for Mesg
impl StrictDecode for Mesg
Source§fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
Decode with the given
std::io::Read
instance; must either
construct an instance or return implementation-specific error type.Source§fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode
. If there are some data remains in the
buffer once deserialization is completed, fails with
Error::DataNotEntirelyConsumed
. Use io::Cursor
over the buffer and
StrictDecode::strict_decode
to avoid such failures.Source§fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
Reads data from file at
path
and reconstructs object from it. Fails
with Error::DataNotEntirelyConsumed
if file contains remaining
data after the object reconstruction.Source§impl StrictEncode for Mesg
impl StrictEncode for Mesg
Source§fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
Encode with the given
std::io::Write
instance; must return result
with either amount of bytes encoded – or implementation-specific
error type.Source§fn strict_serialize(&self) -> Result<Vec<u8>, Error>
fn strict_serialize(&self) -> Result<Vec<u8>, Error>
Serializes data as a byte array using
StrictEncode::strict_encode
functionimpl Eq for Mesg
impl StructuralPartialEq for Mesg
Auto Trait Implementations§
impl Freeze for Mesg
impl RefUnwindSafe for Mesg
impl Send for Mesg
impl Sync for Mesg
impl Unpin for Mesg
impl UnwindSafe for Mesg
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