pub struct CommandPayload {
pub command_payload_type: Option<CommandPayloadType>,
}Fields§
§command_payload_type: Option<CommandPayloadType>Implementations§
Source§impl CommandPayload
impl CommandPayload
pub fn as_content(self) -> Content
pub fn as_discovery_request_payload( &self, ) -> Result<&DiscoveryRequestPayload, MessageError>
pub fn as_discovery_reply_payload( &self, ) -> Result<&DiscoveryReplyPayload, MessageError>
pub fn as_join_request_payload( &self, ) -> Result<&JoinRequestPayload, MessageError>
pub fn as_join_reply_payload(&self) -> Result<&JoinReplyPayload, MessageError>
pub fn as_leave_request_payload( &self, ) -> Result<&LeaveRequestPayload, MessageError>
pub fn as_leave_reply_payload(&self) -> Result<&LeaveReplyPayload, MessageError>
pub fn as_group_add_payload(&self) -> Result<&GroupAddPayload, MessageError>
pub fn as_group_remove_payload( &self, ) -> Result<&GroupRemovePayload, MessageError>
pub fn as_welcome_payload(&self) -> Result<&GroupWelcomePayload, MessageError>
pub fn as_group_close_payload(&self) -> Result<&GroupClosePayload, MessageError>
pub fn as_group_proposal_payload( &self, ) -> Result<&GroupProposalPayload, MessageError>
pub fn as_group_ack_payload(&self) -> Result<&GroupAckPayload, MessageError>
pub fn as_group_nack_payload(&self) -> Result<&GroupNackPayload, MessageError>
pub fn as_ping_payload(&self) -> Result<&PingPayload, MessageError>
Source§impl CommandPayload
impl CommandPayload
Sourcepub fn builder() -> CommandPayloadBuilder
pub fn builder() -> CommandPayloadBuilder
Creates a new builder for CommandPayload
Trait Implementations§
Source§impl Clone for CommandPayload
impl Clone for CommandPayload
Source§fn clone(&self) -> CommandPayload
fn clone(&self) -> CommandPayload
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 CommandPayload
impl Debug for CommandPayload
Source§impl Default for CommandPayload
impl Default for CommandPayload
Source§impl Message for CommandPayload
impl Message for CommandPayload
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for CommandPayload
impl PartialEq for CommandPayload
Source§fn eq(&self, other: &CommandPayload) -> bool
fn eq(&self, other: &CommandPayload) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CommandPayload
Auto Trait Implementations§
impl Freeze for CommandPayload
impl RefUnwindSafe for CommandPayload
impl Send for CommandPayload
impl Sync for CommandPayload
impl Unpin for CommandPayload
impl UnsafeUnpin for CommandPayload
impl UnwindSafe for CommandPayload
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<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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request