pub struct Rpc {
pub msg_type: RpcType,
pub msg_id: RpcId,
pub uid: u32,
pub payload: Option<Payload>,
}
Fields§
§msg_type: RpcType
§msg_id: RpcId
§uid: u32
§payload: Option<Payload>
Implementations§
Source§impl Rpc
impl Rpc
Sourcepub fn mut_msg_type(&mut self) -> &mut RpcType
pub fn mut_msg_type(&mut self) -> &mut RpcType
Return a mutable reference to msg_type
Sourcepub fn set_msg_type(&mut self, value: RpcType) -> &mut Self
pub fn set_msg_type(&mut self, value: RpcType) -> &mut Self
Set the value of msg_type
Sourcepub fn init_msg_type(self, value: RpcType) -> Self
pub fn init_msg_type(self, value: RpcType) -> Self
Builder method that sets the value of msg_type
. Useful for initializing the message.
Sourcepub fn mut_msg_id(&mut self) -> &mut RpcId
pub fn mut_msg_id(&mut self) -> &mut RpcId
Return a mutable reference to msg_id
Sourcepub fn set_msg_id(&mut self, value: RpcId) -> &mut Self
pub fn set_msg_id(&mut self, value: RpcId) -> &mut Self
Set the value of msg_id
Sourcepub fn init_msg_id(self, value: RpcId) -> Self
pub fn init_msg_id(self, value: RpcId) -> Self
Builder method that sets the value of msg_id
. Useful for initializing the message.
Trait Implementations§
Source§impl MessageDecode for Rpc
impl MessageDecode for Rpc
Source§fn decode<IMPL_MICROPB_READ: PbRead>(
&mut self,
decoder: &mut PbDecoder<IMPL_MICROPB_READ>,
len: usize,
) -> Result<(), DecodeError<IMPL_MICROPB_READ::Error>>
fn decode<IMPL_MICROPB_READ: PbRead>( &mut self, decoder: &mut PbDecoder<IMPL_MICROPB_READ>, len: usize, ) -> Result<(), DecodeError<IMPL_MICROPB_READ::Error>>
Decode an instance of the message from the decoder and merge it into
self
. Read moreSource§fn decode_from_bytes(
&mut self,
bytes: &[u8],
) -> Result<(), DecodeError<Infallible>>
fn decode_from_bytes( &mut self, bytes: &[u8], ) -> Result<(), DecodeError<Infallible>>
Decode an instance of the message from the provided bytes
Source§fn decode_len_delimited<R>(
&mut self,
decoder: &mut PbDecoder<R>,
) -> Result<(), DecodeError<<R as PbRead>::Error>>where
R: PbRead,
fn decode_len_delimited<R>(
&mut self,
decoder: &mut PbDecoder<R>,
) -> Result<(), DecodeError<<R as PbRead>::Error>>where
R: PbRead,
Decode an instance of the message from the decoder as a length-delimited record, starting with a length
prefix.
Source§impl MessageEncode for Rpc
impl MessageEncode for Rpc
impl StructuralPartialEq for Rpc
Auto Trait Implementations§
impl Freeze for Rpc
impl RefUnwindSafe for Rpc
impl Send for Rpc
impl Sync for Rpc
impl Unpin for Rpc
impl UnwindSafe for Rpc
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