Struct jomini::ValueReader
source · [−]pub struct ValueReader<'data, 'tokens, E> { /* private fields */ }Expand description
A text reader for a text value
Implementations
sourceimpl<'data, 'tokens, E> ValueReader<'data, 'tokens, E>
impl<'data, 'tokens, E> ValueReader<'data, 'tokens, E>
sourceimpl<'data, 'tokens, E> ValueReader<'data, 'tokens, E> where
E: Encoding + Clone,
impl<'data, 'tokens, E> ValueReader<'data, 'tokens, E> where
E: Encoding + Clone,
sourcepub fn read_str(&self) -> Result<Cow<'data, str>, DeserializeError>
pub fn read_str(&self) -> Result<Cow<'data, str>, DeserializeError>
Interpret the current value as string
sourcepub fn read_string(&self) -> Result<String, DeserializeError>
pub fn read_string(&self) -> Result<String, DeserializeError>
Interpret the current value as string
sourcepub fn read_scalar(&self) -> Result<Scalar<'data>, DeserializeError>
pub fn read_scalar(&self) -> Result<Scalar<'data>, DeserializeError>
Interpret the current value as a scalar
sourcepub fn read_object(
&self
) -> Result<ObjectReader<'data, 'tokens, E>, DeserializeError>
pub fn read_object(
&self
) -> Result<ObjectReader<'data, 'tokens, E>, DeserializeError>
Interpret the current value as an object
sourcepub fn read_array(
&self
) -> Result<ArrayReader<'data, 'tokens, E>, DeserializeError>
pub fn read_array(
&self
) -> Result<ArrayReader<'data, 'tokens, E>, DeserializeError>
Interpret the current value as an array
Trait Implementations
sourceimpl<'data, 'tokens, E: Clone> Clone for ValueReader<'data, 'tokens, E>
impl<'data, 'tokens, E: Clone> Clone for ValueReader<'data, 'tokens, E>
sourcefn clone(&self) -> ValueReader<'data, 'tokens, E>
fn clone(&self) -> ValueReader<'data, 'tokens, E>
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 more
sourceimpl<'data, 'tokens, E: Debug> Debug for ValueReader<'data, 'tokens, E>
impl<'data, 'tokens, E: Debug> Debug for ValueReader<'data, 'tokens, E>
Auto Trait Implementations
impl<'data, 'tokens, E> RefUnwindSafe for ValueReader<'data, 'tokens, E> where
E: RefUnwindSafe,
impl<'data, 'tokens, E> Send for ValueReader<'data, 'tokens, E> where
E: Send,
impl<'data, 'tokens, E> Sync for ValueReader<'data, 'tokens, E> where
E: Sync,
impl<'data, 'tokens, E> Unpin for ValueReader<'data, 'tokens, E> where
E: Unpin,
'data: 'tokens,
impl<'data, 'tokens, E> UnwindSafe for ValueReader<'data, 'tokens, E> where
E: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more