Enum ParseIrOpt

Source
pub enum ParseIrOpt<T> {
    Ready(T),
    Parsed(T, Value),
}
Expand description

Intermediate result for a type that optionally requires parsing.

Variants§

§

Ready(T)

Type instance is ready without parsing.

§

Parsed(T, Value)

Type instance is successfully parsed from this value.

Implementations§

Source§

impl<T> ParseIrOpt<T>

Source

pub fn commit(self) -> T

Source

pub fn rollback(self) -> Value
where T: Into<Value>,

Trait Implementations§

Source§

impl<T: Clone> Clone for ParseIrOpt<T>

Source§

fn clone(&self) -> ParseIrOpt<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for ParseIrOpt<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<ParseIrOpt<Duration>> for Duration

Source§

fn from(value: ParseIrOpt<Duration>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<Duration>> for Value

Source§

fn from(value: ParseIrOpt<Duration>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<bool>> for Value

Source§

fn from(value: ParseIrOpt<bool>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<bool>> for bool

Source§

fn from(value: ParseIrOpt<bool>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<f32>> for Value

Source§

fn from(value: ParseIrOpt<f32>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<f32>> for f32

Source§

fn from(value: ParseIrOpt<f32>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<f64>> for Value

Source§

fn from(value: ParseIrOpt<f64>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<f64>> for f64

Source§

fn from(value: ParseIrOpt<f64>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<i128>> for Value

Source§

fn from(value: ParseIrOpt<i128>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<i128>> for i128

Source§

fn from(value: ParseIrOpt<i128>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<i16>> for Value

Source§

fn from(value: ParseIrOpt<i16>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<i16>> for i16

Source§

fn from(value: ParseIrOpt<i16>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<i32>> for Value

Source§

fn from(value: ParseIrOpt<i32>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<i32>> for i32

Source§

fn from(value: ParseIrOpt<i32>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<i64>> for Value

Source§

fn from(value: ParseIrOpt<i64>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<i64>> for i64

Source§

fn from(value: ParseIrOpt<i64>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<i8>> for Value

Source§

fn from(value: ParseIrOpt<i8>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<i8>> for i8

Source§

fn from(value: ParseIrOpt<i8>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<isize>> for Value

Source§

fn from(value: ParseIrOpt<isize>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<isize>> for isize

Source§

fn from(value: ParseIrOpt<isize>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<u128>> for Value

Source§

fn from(value: ParseIrOpt<u128>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<u128>> for u128

Source§

fn from(value: ParseIrOpt<u128>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<u16>> for Value

Source§

fn from(value: ParseIrOpt<u16>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<u16>> for u16

Source§

fn from(value: ParseIrOpt<u16>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<u32>> for Value

Source§

fn from(value: ParseIrOpt<u32>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<u32>> for u32

Source§

fn from(value: ParseIrOpt<u32>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<u64>> for Value

Source§

fn from(value: ParseIrOpt<u64>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<u64>> for u64

Source§

fn from(value: ParseIrOpt<u64>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<u8>> for Value

Source§

fn from(value: ParseIrOpt<u8>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<u8>> for u8

Source§

fn from(value: ParseIrOpt<u8>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<usize>> for Value

Source§

fn from(value: ParseIrOpt<usize>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<usize>> for usize

Source§

fn from(value: ParseIrOpt<usize>) -> Self

Converts to this type from the input type.
Source§

impl<T: PartialEq> PartialEq for ParseIrOpt<T>

Source§

fn eq(&self, other: &ParseIrOpt<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<Value> for ParseIrOpt<Duration>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<bool>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<f32>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<f64>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<i128>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<i16>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<i32>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<i64>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<i8>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<isize>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<u128>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<u16>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<u32>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<u64>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<u8>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<usize>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T> StructuralPartialEq for ParseIrOpt<T>

Auto Trait Implementations§

§

impl<T> Freeze for ParseIrOpt<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for ParseIrOpt<T>
where T: RefUnwindSafe,

§

impl<T> Send for ParseIrOpt<T>
where T: Send,

§

impl<T> Sync for ParseIrOpt<T>
where T: Sync,

§

impl<T> Unpin for ParseIrOpt<T>
where T: Unpin,

§

impl<T> UnwindSafe for ParseIrOpt<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToValue for T
where T: Into<Value> + Clone,

Source§

fn to_value(&self) -> Value

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.