Skip to main content

FromValueResult

Enum FromValueResult 

Source
pub enum FromValueResult<T> {
    Ok(T),
    Invalid(Value),
}
Expand description

Used to try conversion and return value instead of error

Variants§

§

Ok(T)

Converted to T

§

Invalid(Value)

Could not convert to T, return original value then

Trait Implementations§

Source§

impl From<Value> for FromValueResult<Key>

Source§

fn from(value: Value) -> FromValueResult<Key>

Converts to this type from the input type.
Source§

impl From<Value> for FromValueResult<bool>

Source§

fn from(value: Value) -> FromValueResult<bool>

Converts to this type from the input type.
Source§

impl From<Value> for FromValueResult<i64>

Source§

fn from(value: Value) -> FromValueResult<i64>

Converts to this type from the input type.
Source§

impl From<Value> for FromValueResult<String>

Source§

fn from(value: Value) -> FromValueResult<String>

Converts to this type from the input type.
Source§

impl From<Value> for FromValueResult<Node>

Source§

fn from(value: Value) -> FromValueResult<Node>

Converts to this type from the input type.
Source§

impl From<Value> for FromValueResult<Edge>

Source§

fn from(value: Value) -> FromValueResult<Edge>

Converts to this type from the input type.
Source§

impl From<Value> for FromValueResult<SinglePath>

Source§

fn from(value: Value) -> FromValueResult<SinglePath>

Converts to this type from the input type.
Source§

impl From<Value> for FromValueResult<Path>

Source§

fn from(value: Value) -> FromValueResult<Path>

Converts to this type from the input type.
Source§

impl From<Value> for FromValueResult<Vec<Value>>

Source§

fn from(value: Value) -> FromValueResult<Vec<Value>>

Converts to this type from the input type.
Source§

impl From<Value> for FromValueResult<ValueMap>

Source§

fn from(value: Value) -> FromValueResult<ValueMap>

Converts to this type from the input type.
Source§

impl From<Value> for FromValueResult<f64>

Source§

fn from(value: Value) -> FromValueResult<f64>

Converts to this type from the input type.
Source§

impl From<Value> for FromValueResult<Value>

Source§

fn from(value: Value) -> FromValueResult<Value>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<T> Forget for FromValueResult<T>

§

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

§

impl<T> Move for FromValueResult<T>

§

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

§

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

§

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

§

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

§

impl<T> UnsafeUnpin for FromValueResult<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for FromValueResult<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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.