pub struct PartialRole {
pub name: Option<String>,
pub permissions: Option<(ServerPermissions, ChannelPermissions)>,
pub color: Option<String>,
pub hoist: Option<bool>,
pub rank: Option<usize>,
}Expand description
A role where all the fields are optional, and can be used to describe a patch applied to a role.
Fields§
§name: Option<String>§permissions: Option<(ServerPermissions, ChannelPermissions)>§color: Option<String>§hoist: Option<bool>§rank: Option<usize>Implementations§
Trait Implementations§
Source§impl Clone for PartialRole
impl Clone for PartialRole
Source§fn clone(&self) -> PartialRole
fn clone(&self) -> PartialRole
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 PartialRole
impl Debug for PartialRole
Source§impl Default for PartialRole
impl Default for PartialRole
Source§fn default() -> PartialRole
fn default() -> PartialRole
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PartialRole
impl<'de> Deserialize<'de> for PartialRole
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 Hash for PartialRole
impl Hash for PartialRole
Source§impl Ord for PartialRole
impl Ord for PartialRole
Source§fn cmp(&self, other: &PartialRole) -> Ordering
fn cmp(&self, other: &PartialRole) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PartialRole
impl PartialEq for PartialRole
Source§impl PartialOrd for PartialRole
impl PartialOrd for PartialRole
Source§impl Serialize for PartialRole
impl Serialize for PartialRole
impl Eq for PartialRole
impl StructuralPartialEq for PartialRole
Auto Trait Implementations§
impl Freeze for PartialRole
impl RefUnwindSafe for PartialRole
impl Send for PartialRole
impl Sync for PartialRole
impl Unpin for PartialRole
impl UnwindSafe for PartialRole
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