Struct fbxcel::pull_parser::SyntacticPosition
source · [−]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
sourceimpl 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
sourceimpl Clone for SyntacticPosition
impl Clone for SyntacticPosition
sourcefn clone(&self) -> SyntacticPosition
fn clone(&self) -> SyntacticPosition
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for SyntacticPosition
impl Debug for SyntacticPosition
sourceimpl Hash for SyntacticPosition
impl Hash for SyntacticPosition
sourceimpl PartialEq<SyntacticPosition> for SyntacticPosition
impl PartialEq<SyntacticPosition> for SyntacticPosition
sourcefn eq(&self, other: &SyntacticPosition) -> bool
fn eq(&self, other: &SyntacticPosition) -> bool
impl Eq for SyntacticPosition
impl StructuralEq for SyntacticPosition
impl StructuralPartialEq for SyntacticPosition
Auto Trait Implementations
impl RefUnwindSafe for SyntacticPosition
impl Send for SyntacticPosition
impl Sync for SyntacticPosition
impl Unpin for SyntacticPosition
impl UnwindSafe for SyntacticPosition
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more