pub struct SemanticMeta {
pub semantic_type: SemanticType,
pub secondary_types: SmallVec<[SemanticType; 2]>,
pub hints: ProcessingHints,
}
Expand description
Complete semantic metadata for a frame
Fields§
§semantic_type: SemanticType
Primary semantic type
secondary_types: SmallVec<[SemanticType; 2]>
Optional secondary types for mixed data
hints: ProcessingHints
Processing hints
Implementations§
Source§impl SemanticMeta
impl SemanticMeta
Sourcepub fn new(semantic_type: SemanticType) -> Self
pub fn new(semantic_type: SemanticType) -> Self
Create new semantic metadata
Sourcepub fn with_hints(semantic_type: SemanticType, hints: ProcessingHints) -> Self
pub fn with_hints(semantic_type: SemanticType, hints: ProcessingHints) -> Self
Create with explicit hints
Sourcepub fn with_secondary(self, secondary_type: SemanticType) -> Self
pub fn with_secondary(self, secondary_type: SemanticType) -> Self
Add secondary semantic type
Sourcepub fn processing_strategy(&self) -> ProcessingStrategy
pub fn processing_strategy(&self) -> ProcessingStrategy
Get the best processing strategy based on semantics
Trait Implementations§
Source§impl Clone for SemanticMeta
impl Clone for SemanticMeta
Source§fn clone(&self) -> SemanticMeta
fn clone(&self) -> SemanticMeta
Returns a duplicate 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 SemanticMeta
impl Debug for SemanticMeta
Source§impl<'de> Deserialize<'de> for SemanticMeta
impl<'de> Deserialize<'de> for SemanticMeta
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 PartialEq for SemanticMeta
impl PartialEq for SemanticMeta
Source§impl Serialize for SemanticMeta
impl Serialize for SemanticMeta
impl StructuralPartialEq for SemanticMeta
Auto Trait Implementations§
impl Freeze for SemanticMeta
impl RefUnwindSafe for SemanticMeta
impl Send for SemanticMeta
impl Sync for SemanticMeta
impl Unpin for SemanticMeta
impl UnwindSafe for SemanticMeta
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