[][src]Struct piston_meta::Convert

pub struct Convert<'a> { /* fields omitted */ }

Stores state when converting from meta data.

Methods

impl<'a> Convert<'a>[src]

pub fn new(data: &'a [Range<MetaData>]) -> Convert<'a>[src]

Creates a new Convert.

pub fn remaining_data_len(&self) -> usize[src]

Returns the length of remaining data.

pub fn subtract(self, rhs: Convert) -> Range[src]

Returns the difference in offset.

pub fn source(self, rhs: Convert) -> Option<Range>[src]

Returns the subtracted range in source (union of meta data ranges).

pub fn update(&mut self, range: Range)[src]

Updates with parsed range.

pub fn start_node(&self, name: &str) -> Result<Range, ()>[src]

Reads start node.

pub fn end_node(&self, name: &str) -> Result<Range, ()>[src]

Reads end node.

pub fn ignore(&self) -> Range[src]

Ignores next item. If this is the start of a node, it ignores all items to the end node.

pub fn meta_string(&self, name: &str) -> Result<(Range, Arc<String>), ()>[src]

Reads string.

pub fn meta_f64(&self, name: &str) -> Result<(Range, f64), ()>[src]

Reads f64.

pub fn meta_bool(&self, name: &str) -> Result<(Range, bool), ()>[src]

Reads bool.

Trait Implementations

impl<'a> Clone for Convert<'a>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a> Copy for Convert<'a>[src]

impl<'a> Debug for Convert<'a>[src]

Auto Trait Implementations

impl<'a> Send for Convert<'a>

impl<'a> Sync for Convert<'a>

Blanket Implementations

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.

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

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

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