#[non_exhaustive]pub struct CodecCapabilitySet {
pub text: bool,
pub layout: bool,
pub confidence: bool,
pub timestamps: bool,
}Expand description
Orthogonal document codec capabilities delivered or advertised by a codec.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.text: boolCodec can emit text.
layout: boolCodec can emit layout geometry.
confidence: boolCodec can emit confidence buckets.
timestamps: boolCodec can emit timestamps.
Implementations§
Source§impl CodecCapabilitySet
impl CodecCapabilitySet
Sourcepub const TEXT_ONLY: CodecCapabilitySet
pub const TEXT_ONLY: CodecCapabilitySet
Text-only capability set.
Sourcepub const fn new(
text: bool,
layout: bool,
confidence: bool,
timestamps: bool,
) -> CodecCapabilitySet
pub const fn new( text: bool, layout: bool, confidence: bool, timestamps: bool, ) -> CodecCapabilitySet
Builds a codec capability bitset.
Sourcepub fn contains(self, requested: CodecCapabilitySet) -> bool
pub fn contains(self, requested: CodecCapabilitySet) -> bool
Returns true when this set contains every requested capability bit.
Trait Implementations§
Source§impl Clone for CodecCapabilitySet
impl Clone for CodecCapabilitySet
Source§fn clone(&self) -> CodecCapabilitySet
fn clone(&self) -> CodecCapabilitySet
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 moreSource§impl Debug for CodecCapabilitySet
impl Debug for CodecCapabilitySet
Source§impl Default for CodecCapabilitySet
impl Default for CodecCapabilitySet
Source§fn default() -> CodecCapabilitySet
fn default() -> CodecCapabilitySet
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CodecCapabilitySet
impl<'de> Deserialize<'de> for CodecCapabilitySet
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CodecCapabilitySet, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CodecCapabilitySet, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CodecCapabilitySet
impl PartialEq for CodecCapabilitySet
Source§fn eq(&self, other: &CodecCapabilitySet) -> bool
fn eq(&self, other: &CodecCapabilitySet) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CodecCapabilitySet
impl Serialize for CodecCapabilitySet
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for CodecCapabilitySet
impl Eq for CodecCapabilitySet
impl StructuralPartialEq for CodecCapabilitySet
Auto Trait Implementations§
impl Freeze for CodecCapabilitySet
impl RefUnwindSafe for CodecCapabilitySet
impl Send for CodecCapabilitySet
impl Sync for CodecCapabilitySet
impl Unpin for CodecCapabilitySet
impl UnsafeUnpin for CodecCapabilitySet
impl UnwindSafe for CodecCapabilitySet
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.