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§
Sourcefn capabilities(&self) -> &CapabilitySet
fn capabilities(&self) -> &CapabilitySet
Get the capability set for this protocol/device.
Provided Methods§
Sourcefn supports(&self, cap: Capability) -> bool
fn supports(&self, cap: Capability) -> bool
Check if a specific capability is supported.
Sourcefn supports_all(&self, caps: &[Capability]) -> bool
fn supports_all(&self, caps: &[Capability]) -> bool
Check if all the given capabilities are supported.