Struct distant_protocol::Capability
source · pub struct Capability {
pub kind: String,
pub description: String,
}Expand description
Capability tied to a server. A capability is equivalent based on its kind and not description.
Fields§
§kind: StringLabel describing the kind of capability
description: StringInformation about the capability
Implementations§
source§impl Capability
impl Capability
sourcepub fn to_capability_kind(&self) -> Option<CapabilityKind>
pub fn to_capability_kind(&self) -> Option<CapabilityKind>
Will convert the Capability’s kind into a known CapabilityKind if possible,
returning None if the capability is unknown
sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns true if the described capability is unknown
Trait Implementations§
source§impl BitOr<Capability> for &Capabilities
impl BitOr<Capability> for &Capabilities
§type Output = Capabilities
type Output = Capabilities
The resulting type after applying the
| operator.source§impl Clone for Capability
impl Clone for Capability
source§fn clone(&self) -> Capability
fn clone(&self) -> Capability
Returns a copy 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 Capability
impl Debug for Capability
source§impl<'de> Deserialize<'de> for Capability
impl<'de> Deserialize<'de> for Capability
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 From<RequestKind> for Capability
impl From<RequestKind> for Capability
source§fn from(kind: CapabilityKind) -> Self
fn from(kind: CapabilityKind) -> Self
Creates a new capability using the kind’s default message
source§impl FromIterator<Capability> for Capabilities
impl FromIterator<Capability> for Capabilities
source§fn from_iter<I: IntoIterator<Item = Capability>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = Capability>>(iter: I) -> Self
Creates a value from an iterator. Read more
source§impl Hash for Capability
impl Hash for Capability
source§impl Ord for Capability
impl Ord for Capability
source§impl PartialEq<Capability> for Capability
impl PartialEq<Capability> for Capability
source§impl PartialOrd<Capability> for Capability
impl PartialOrd<Capability> for Capability
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Serialize for Capability
impl Serialize for Capability
impl Eq for Capability
Auto Trait Implementations§
impl RefUnwindSafe for Capability
impl Send for Capability
impl Sync for Capability
impl Unpin for Capability
impl UnwindSafe for Capability
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