pub struct PermissionDenied {
pub permission: Option<u32>,
pub channel_id: Option<u32>,
pub session: Option<u32>,
pub reason: Option<String>,
pub type: Option<i32>,
pub name: Option<String>,
}Fields§
§permission: Option<u32>The denied permission when type is Permission.
channel_id: Option<u32>channel_id for the channel where the permission was denied when type is Permission.
session: Option<u32>The user who was denied permissions, identified by session.
reason: Option<String>Textual reason for the denial.
type: Option<i32>Type of the denial.
name: Option<String>The name that is invalid when type is UserName.
Implementations§
Source§impl PermissionDenied
impl PermissionDenied
Sourcepub fn permission(&self) -> u32
pub fn permission(&self) -> u32
Returns the value of permission, or the default value if permission is unset.
Sourcepub fn channel_id(&self) -> u32
pub fn channel_id(&self) -> u32
Returns the value of channel_id, or the default value if channel_id is unset.
Sourcepub fn session(&self) -> u32
pub fn session(&self) -> u32
Returns the value of session, or the default value if session is unset.
Sourcepub fn reason(&self) -> &str
pub fn reason(&self) -> &str
Returns the value of reason, or the default value if reason is unset.
Trait Implementations§
Source§impl Clone for PermissionDenied
impl Clone for PermissionDenied
Source§fn clone(&self) -> PermissionDenied
fn clone(&self) -> PermissionDenied
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 PermissionDenied
impl Debug for PermissionDenied
Source§impl Default for PermissionDenied
impl Default for PermissionDenied
Source§impl Message for PermissionDenied
impl Message for PermissionDenied
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 PermissionDenied
impl PartialEq for PermissionDenied
impl StructuralPartialEq for PermissionDenied
Auto Trait Implementations§
impl Freeze for PermissionDenied
impl RefUnwindSafe for PermissionDenied
impl Send for PermissionDenied
impl Sync for PermissionDenied
impl Unpin for PermissionDenied
impl UnwindSafe for PermissionDenied
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