pub struct StreamMessage<T> {
pub stream_id: StreamId,
pub sequence: Sequence,
pub content: StreamContent<T>,
}Fields§
§stream_id: StreamIdReceivers identify streams by (sender, stream_id). This means each node can allocate stream_ids independently and that many streams can be sent on a single network topic.
sequence: SequenceIdentifies the sequence of each message in the stream starting from 0.
content: StreamContent<T>The content of this stream message
Implementations§
Trait Implementations§
Source§impl<T> BorshDeserialize for StreamMessage<T>where
T: BorshDeserialize,
impl<T> BorshDeserialize for StreamMessage<T>where
T: BorshDeserialize,
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl<T> BorshSerialize for StreamMessage<T>where
T: BorshSerialize,
impl<T> BorshSerialize for StreamMessage<T>where
T: BorshSerialize,
Source§impl<T: Clone> Clone for StreamMessage<T>
impl<T: Clone> Clone for StreamMessage<T>
Source§fn clone(&self) -> StreamMessage<T>
fn clone(&self) -> StreamMessage<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for StreamMessage<T>
impl<T: Debug> Debug for StreamMessage<T>
Source§impl<T: PartialEq> PartialEq for StreamMessage<T>
impl<T: PartialEq> PartialEq for StreamMessage<T>
impl<T: Eq> Eq for StreamMessage<T>
impl<T> StructuralPartialEq for StreamMessage<T>
Auto Trait Implementations§
impl<T> !Freeze for StreamMessage<T>
impl<T> RefUnwindSafe for StreamMessage<T>where
T: RefUnwindSafe,
impl<T> Send for StreamMessage<T>where
T: Send,
impl<T> Sync for StreamMessage<T>where
T: Sync,
impl<T> Unpin for StreamMessage<T>where
T: Unpin,
impl<T> UnsafeUnpin for StreamMessage<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for StreamMessage<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage