pub struct ModalitySet(/* private fields */);Expand description
A set of consumer modalities, as a small bitset.
Match dimensions for variants (doc 06 §2); vision/audio are what
make multimodal variants ride the ordinary matcher.
Implementations§
Source§impl ModalitySet
impl ModalitySet
Sourcepub const fn contains(self, required: Self) -> bool
pub const fn contains(self, required: Self) -> bool
Does self contain every modality in required?
Sourcepub const fn from_bits_truncate(bits: u8) -> Self
pub const fn from_bits_truncate(bits: u8) -> Self
Build from raw bits, ignoring undefined ones — for hosts deserializing foreign context descriptors (and for exhaustive testing over the modality space).
Trait Implementations§
Source§impl Clone for ModalitySet
impl Clone for ModalitySet
Source§fn clone(&self) -> ModalitySet
fn clone(&self) -> ModalitySet
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ModalitySet
Source§impl Debug for ModalitySet
impl Debug for ModalitySet
Source§impl Default for ModalitySet
impl Default for ModalitySet
Source§fn default() -> ModalitySet
fn default() -> ModalitySet
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModalitySet
impl<'de> Deserialize<'de> for ModalitySet
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Accepts BOTH wire forms: the compact bits (5) and the humane
names (["text", "shell"]) — hosts and switchboards write names;
the log and the vectors keep bits.
impl Eq for ModalitySet
Source§impl PartialEq for ModalitySet
impl PartialEq for ModalitySet
Source§impl Serialize for ModalitySet
impl Serialize for ModalitySet
impl StructuralPartialEq for ModalitySet
Auto Trait Implementations§
impl Freeze for ModalitySet
impl RefUnwindSafe for ModalitySet
impl Send for ModalitySet
impl Sync for ModalitySet
impl Unpin for ModalitySet
impl UnsafeUnpin for ModalitySet
impl UnwindSafe for ModalitySet
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