pub struct ServiceMessage {
pub index: u64,
pub source: ServiceId,
}Expand description
A message from another service.
The message is stored in the specified service’s storage under key
StorageKey::OutgoingMessage(index) where index is the message sequence number.
accumulate copies this message into the destination storage under
StorageKey::IncomingMessage(src, index) key.
Fields§
§index: u64Sequence number.
source: ServiceIdStorage service id.
Trait Implementations§
Source§impl Clone for ServiceMessage
impl Clone for ServiceMessage
Source§fn clone(&self) -> ServiceMessage
fn clone(&self) -> ServiceMessage
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 ServiceMessage
impl Debug for ServiceMessage
Source§impl Decode for ServiceMessage
impl Decode for ServiceMessage
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
Attempt to deserialise the value from input.
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§impl Encode for ServiceMessage
impl Encode for ServiceMessage
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl Hash for ServiceMessage
impl Hash for ServiceMessage
Source§impl Ord for ServiceMessage
impl Ord for ServiceMessage
Source§fn cmp(&self, other: &ServiceMessage) -> Ordering
fn cmp(&self, other: &ServiceMessage) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ServiceMessage
impl PartialEq for ServiceMessage
Source§fn eq(&self, other: &ServiceMessage) -> bool
fn eq(&self, other: &ServiceMessage) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ServiceMessage
impl PartialOrd for ServiceMessage
impl Copy for ServiceMessage
impl EncodeLike for ServiceMessage
impl Eq for ServiceMessage
impl StructuralPartialEq for ServiceMessage
Auto Trait Implementations§
impl Freeze for ServiceMessage
impl RefUnwindSafe for ServiceMessage
impl Send for ServiceMessage
impl Sync for ServiceMessage
impl Unpin for ServiceMessage
impl UnsafeUnpin for ServiceMessage
impl UnwindSafe for ServiceMessage
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