pub struct SendMessageRequest<Message> {
pub destination: Destination,
pub authenticated: bool,
pub is_tracked: bool,
pub grant: Resources,
pub message: Message,
}
Expand description
A request to send a message.
Fields§
§destination: Destination
The destination of the message.
authenticated: bool
Whether the message is authenticated.
is_tracked: bool
Whether the message is tracked.
grant: Resources
The grant resources forwarded with the message.
message: Message
The message itself.
Implementations§
Source§impl<Message> SendMessageRequest<Message>where
Message: Serialize,
impl<Message> SendMessageRequest<Message>where
Message: Serialize,
Sourcepub fn into_raw(self) -> SendMessageRequest<Vec<u8>>
pub fn into_raw(self) -> SendMessageRequest<Vec<u8>>
Serializes the internal Message
type into raw bytes.
Trait Implementations§
Source§impl<Message: Clone> Clone for SendMessageRequest<Message>
impl<Message: Clone> Clone for SendMessageRequest<Message>
Source§fn clone(&self) -> SendMessageRequest<Message>
fn clone(&self) -> SendMessageRequest<Message>
Returns a copy 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<Message> Debug for SendMessageRequest<Message>where
Message: Debug,
impl<Message> Debug for SendMessageRequest<Message>where
Message: Debug,
Source§impl<'de, Message> Deserialize<'de> for SendMessageRequest<Message>where
Message: Deserialize<'de>,
impl<'de, Message> Deserialize<'de> for SendMessageRequest<Message>where
Message: Deserialize<'de>,
Source§fn 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
Source§impl<Message> Serialize for SendMessageRequest<Message>where
Message: Serialize,
impl<Message> Serialize for SendMessageRequest<Message>where
Message: Serialize,
Source§impl WitLoad for SendMessageRequest<Vec<u8>>
impl WitLoad for SendMessageRequest<Vec<u8>>
Source§fn load<Instance>(
memory: &Memory<'_, Instance>,
location: GuestPointer,
) -> Result<Self, RuntimeError>where
Instance: InstanceWithMemory,
<Instance::Runtime as Runtime>::Memory: RuntimeMemory<Instance>,
fn load<Instance>(
memory: &Memory<'_, Instance>,
location: GuestPointer,
) -> Result<Self, RuntimeError>where
Instance: InstanceWithMemory,
<Instance::Runtime as Runtime>::Memory: RuntimeMemory<Instance>,
Loads an instance of the type from the
location
in the guest’s memory
.Source§fn lift_from<Instance>(
flat_layout: <Self::Layout as Layout>::Flat,
memory: &Memory<'_, Instance>,
) -> Result<Self, RuntimeError>where
Instance: InstanceWithMemory,
<Instance::Runtime as Runtime>::Memory: RuntimeMemory<Instance>,
fn lift_from<Instance>(
flat_layout: <Self::Layout as Layout>::Flat,
memory: &Memory<'_, Instance>,
) -> Result<Self, RuntimeError>where
Instance: InstanceWithMemory,
<Instance::Runtime as Runtime>::Memory: RuntimeMemory<Instance>,
Lifts an instance of the type from the
flat_layout
representation. Read moreSource§impl WitType for SendMessageRequest<Vec<u8>>
impl WitType for SendMessageRequest<Vec<u8>>
Source§type Layout = <HCons<Destination, HCons<bool, HCons<bool, HCons<Resources, HCons<Vec<u8>, HNil>>>>> as WitType>::Layout
type Layout = <HCons<Destination, HCons<bool, HCons<bool, HCons<Resources, HCons<Vec<u8>, HNil>>>>> as WitType>::Layout
The layout of the type as fundamental types.
Source§type Dependencies = HCons<Destination, HCons<bool, HCons<bool, HCons<Resources, HCons<Vec<u8>, HNil>>>>>
type Dependencies = HCons<Destination, HCons<bool, HCons<bool, HCons<Resources, HCons<Vec<u8>, HNil>>>>>
Other
WitType
s that this type depends on.Source§fn wit_type_name() -> Cow<'static, str>
fn wit_type_name() -> Cow<'static, str>
Generates the WIT type name for this type.
Source§fn wit_type_declaration() -> Cow<'static, str>
fn wit_type_declaration() -> Cow<'static, str>
Generates the WIT type declaration for this type.
Auto Trait Implementations§
impl<Message> Freeze for SendMessageRequest<Message>where
Message: Freeze,
impl<Message> RefUnwindSafe for SendMessageRequest<Message>where
Message: RefUnwindSafe,
impl<Message> Send for SendMessageRequest<Message>where
Message: Send,
impl<Message> Sync for SendMessageRequest<Message>where
Message: Sync,
impl<Message> Unpin for SendMessageRequest<Message>where
Message: Unpin,
impl<Message> UnwindSafe for SendMessageRequest<Message>where
Message: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
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<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length
bytes from memory from the provided location
.
Source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes
to memory at the provided location
.