Skip to main content

ProtocolCapabilities

Trait ProtocolCapabilities 

Source
pub trait ProtocolCapabilities {
    // Required method
    fn capabilities(&self) -> &CapabilitySet;

    // Provided methods
    fn supports(&self, cap: Capability) -> bool { ... }
    fn supports_all(&self, caps: &[Capability]) -> bool { ... }
}
Expand description

Trait for types that have protocol capabilities.

Required Methods§

Source

fn capabilities(&self) -> &CapabilitySet

Get the capability set for this protocol/device.

Provided Methods§

Source

fn supports(&self, cap: Capability) -> bool

Check if a specific capability is supported.

Source

fn supports_all(&self, caps: &[Capability]) -> bool

Check if all the given capabilities are supported.

Implementors§