Struct roxmltree::NodeId[][src]

pub struct NodeId(_);

A node ID stored as u32.

An index into a Tree-internal Vec.

Note that this value should be used with care since roxmltree doesn’t check that NodeId actually belongs to a selected Document. So you can end up in a situation, when NodeId produced by one Document is used to select a node in another Document.

Implementations

impl NodeId[src]

pub fn new(id: u32) -> Self[src]

Construct a new NodeId from a u32.

u32 is more than enough since we have a 4GiB input data limit anyway.

pub fn get(self) -> u32[src]

Returns the u32 representation of the NodeId.

pub fn get_usize(self) -> usize[src]

Returns the usize representation of the NodeId.

Trait Implementations

impl Clone for NodeId[src]

impl Copy for NodeId[src]

impl Debug for NodeId[src]

impl From<u32> for NodeId[src]

impl From<usize> for NodeId[src]

impl PartialEq<NodeId> for NodeId[src]

impl StructuralPartialEq for NodeId[src]

Auto Trait Implementations

impl RefUnwindSafe for NodeId

impl Send for NodeId

impl Sync for NodeId

impl Unpin for NodeId

impl UnwindSafe for NodeId

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.