pub struct ContextActionModify {
pub action: String,
pub text: Option<String>,
pub context: Option<u32>,
pub operation: Option<i32>,
}
Expand description
Used to add or remove custom context menu item on client-side.
Fields§
§action: String
The action identifier. Used later to initiate an action.
text: Option<String>
The display name of the action.
context: Option<u32>
Context bit flags defining where the action should be displayed. Flags can be OR-ed to combine different types.
operation: Option<i32>
Choose either to add or to remove the context action. Note: This field only exists after Mumble 1.2.4-beta1 release. The message will be recognized as Add regardless of this field before said release.
Implementations§
Source§impl ContextActionModify
impl ContextActionModify
Sourcepub fn context(&self) -> u32
pub fn context(&self) -> u32
Returns the value of context
, or the default value if context
is unset.
Sourcepub fn operation(&self) -> Operation
pub fn operation(&self) -> Operation
Returns the enum value of operation
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_operation(&mut self, value: Operation)
pub fn set_operation(&mut self, value: Operation)
Sets operation
to the provided enum value.
Trait Implementations§
Source§impl Clone for ContextActionModify
impl Clone for ContextActionModify
Source§fn clone(&self) -> ContextActionModify
fn clone(&self) -> ContextActionModify
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 Debug for ContextActionModify
impl Debug for ContextActionModify
Source§impl Default for ContextActionModify
impl Default for ContextActionModify
Source§impl Message for ContextActionModify
impl Message for ContextActionModify
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 ContextActionModify
impl PartialEq for ContextActionModify
impl StructuralPartialEq for ContextActionModify
Auto Trait Implementations§
impl Freeze for ContextActionModify
impl RefUnwindSafe for ContextActionModify
impl Send for ContextActionModify
impl Sync for ContextActionModify
impl Unpin for ContextActionModify
impl UnwindSafe for ContextActionModify
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