pub struct FeatureStructure { /* private fields */ }Expand description
Immutable canonical feature structure with explicit reentrancies.
Implementations§
Source§impl FeatureStructure
impl FeatureStructure
Sourcepub fn root(&self) -> FeatureStructureNodeId
pub fn root(&self) -> FeatureStructureNodeId
Return the root node.
Sourcepub fn node(
&self,
id: FeatureStructureNodeId,
) -> Option<FeatureStructureNode<'_>>
pub fn node( &self, id: FeatureStructureNodeId, ) -> Option<FeatureStructureNode<'_>>
Inspect a node without exposing the mutable graph representation.
Sourcepub fn attributes(
&self,
id: FeatureStructureNodeId,
) -> Option<impl ExactSizeIterator<Item = FeatureStructureAttribute<'_>> + '_>
pub fn attributes( &self, id: FeatureStructureNodeId, ) -> Option<impl ExactSizeIterator<Item = FeatureStructureAttribute<'_>> + '_>
Return the ordered attributes of a map node.
Sourcepub fn parse(input: &str) -> Result<Self, FeatureStructureParseError>
pub fn parse(input: &str) -> Result<Self, FeatureStructureParseError>
Parse Alto feature-structure syntax.
Attribute-value matrices use [attribute: value]; #name introduces
or refers to a reentrant variable.
Sourcepub fn unify(&self, other: &Self) -> Option<Self>
pub fn unify(&self, other: &Self) -> Option<Self>
Compute non-destructive unification, or return None on a clash.
Sourcepub fn project(&self, attribute: &str) -> Option<Self>
pub fn project(&self, attribute: &str) -> Option<Self>
Return the value stored under a top-level attribute.
Trait Implementations§
Source§impl Clone for FeatureStructure
impl Clone for FeatureStructure
Source§fn clone(&self) -> FeatureStructure
fn clone(&self) -> FeatureStructure
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 FeatureStructure
impl Debug for FeatureStructure
Source§impl Display for FeatureStructure
impl Display for FeatureStructure
impl Eq for FeatureStructure
Source§impl Hash for FeatureStructure
impl Hash for FeatureStructure
Source§impl OutputCodec<FeatureStructure> for FeatureStructureVisualizationCodec
impl OutputCodec<FeatureStructure> for FeatureStructureVisualizationCodec
Source§type Output = VisualRepresentation
type Output = VisualRepresentation
The representation produced by this codec.
Source§fn metadata(&self) -> &'static CodecMetadata
fn metadata(&self) -> &'static CodecMetadata
Return static codec metadata. This must not inspect or encode a value.
Source§fn encode(&self, value: &FeatureStructure) -> Self::Output
fn encode(&self, value: &FeatureStructure) -> Self::Output
Encode
value.Source§impl PartialEq for FeatureStructure
impl PartialEq for FeatureStructure
Source§fn eq(&self, other: &FeatureStructure) -> bool
fn eq(&self, other: &FeatureStructure) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FeatureStructure
Auto Trait Implementations§
impl Freeze for FeatureStructure
impl RefUnwindSafe for FeatureStructure
impl Send for FeatureStructure
impl Sync for FeatureStructure
impl Unpin for FeatureStructure
impl UnsafeUnpin for FeatureStructure
impl UnwindSafe for FeatureStructure
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.