pub struct Topic {
pub body: Vec<u8>,
pub container_ids: Vec<ContainerId>,
}
Expand description
Storm topic data type
Fields§
§body: Vec<u8>
Topic 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 Topic
impl ConsensusCommit for Topic
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 Topic
impl Ord for Topic
Source§impl PartialOrd for Topic
impl PartialOrd for Topic
Source§impl Strategy for Topic
impl Strategy for Topic
Source§type Strategy = UsingStrict
type Strategy = UsingStrict
Specific strategy. List of supported strategies: Read more
Source§impl StrictDecode for Topic
impl StrictDecode for Topic
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 Topic
impl StrictEncode for Topic
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 Topic
impl StructuralPartialEq for Topic
Auto Trait Implementations§
impl Freeze for Topic
impl RefUnwindSafe for Topic
impl Send for Topic
impl Sync for Topic
impl Unpin for Topic
impl UnwindSafe for Topic
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