pub unsafe trait FromValue<'a>: Sized {
type Checker: ValueTypeChecker;
unsafe fn from_value(value: &'a Value) -> Self;
}
Expand description
Required Associated Types
Value type checker.
Required Methods
sourceunsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a Value
.
Safety
Self::Checker::check()
must be called first and must not fail.
Implementations on Foreign Types
sourceimpl<'a> FromValue<'a> for Vec<GString>
impl<'a> FromValue<'a> for Vec<GString>
type Checker = GenericValueTypeChecker<Vec<GString, Global>>
unsafe fn from_value(value: &'a Value) -> Self
sourceimpl<'a, T, C, E> FromValue<'a> for Option<T> where
T: FromValue<'a, Checker = C> + StaticType,
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>,
E: Error + Send + Sized + 'static,
impl<'a, T, C, E> FromValue<'a> for Option<T> where
T: FromValue<'a, Checker = C> + StaticType,
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>,
E: Error + Send + Sized + 'static,
Blanket implementation for all optional types.