pub struct SyntacticPosition { /* private fields */ }
Expand description
Syntactic position.
This contains not only byte-position, but also additional information such as node path and attribute index.
This type is implemented based on FBX 7.4 data structure, and may change in future if FBX syntax has breaking changes.
Implementations§
Source§impl SyntacticPosition
impl SyntacticPosition
Sourcepub fn component_byte_pos(&self) -> u64
pub fn component_byte_pos(&self) -> u64
Returns the beginning byte position of the node or attribute.
Sourcepub fn node_path(&self) -> &[(usize, String)]
pub fn node_path(&self) -> &[(usize, String)]
Returns the node path.
This is a vector of pairs of node indices in siblings (i.e. the number of preceding siblings) and node names.
Sourcepub fn attribute_index(&self) -> Option<usize>
pub fn attribute_index(&self) -> Option<usize>
Returns the node attribute index (if the position points an attribute).
Trait Implementations§
Source§impl Clone for SyntacticPosition
impl Clone for SyntacticPosition
Source§fn clone(&self) -> SyntacticPosition
fn clone(&self) -> SyntacticPosition
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 SyntacticPosition
impl Debug for SyntacticPosition
Source§impl Hash for SyntacticPosition
impl Hash for SyntacticPosition
Source§impl PartialEq for SyntacticPosition
impl PartialEq for SyntacticPosition
impl Eq for SyntacticPosition
impl StructuralPartialEq for SyntacticPosition
Auto Trait Implementations§
impl Freeze for SyntacticPosition
impl RefUnwindSafe for SyntacticPosition
impl Send for SyntacticPosition
impl Sync for SyntacticPosition
impl Unpin for SyntacticPosition
impl UnwindSafe for SyntacticPosition
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