glib::value

Trait FromValue

source
pub unsafe trait FromValue<'a>: Sized {
    type Checker: ValueTypeChecker;

    // Required method
    unsafe fn from_value(value: &'a Value) -> Self;
}
Expand description

Trait to retrieve the contained value from a Value.

Usually this would not be used directly but from the get function on a Value

Required Associated Types§

source

type Checker: ValueTypeChecker

Value type checker.

Required Methods§

source

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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a> FromValue<'a> for &'a str

source§

impl<'a> FromValue<'a> for &'a [GStringPtr]

source§

impl<'a> FromValue<'a> for bool

source§

impl<'a> FromValue<'a> for char

source§

type Checker = CharTypeChecker

source§

unsafe fn from_value(value: &'a Value) -> Self

source§

impl<'a> FromValue<'a> for f32

source§

impl<'a> FromValue<'a> for f64

source§

impl<'a> FromValue<'a> for i8

source§

impl<'a> FromValue<'a> for i32

source§

impl<'a> FromValue<'a> for i64

source§

impl<'a> FromValue<'a> for u8

source§

impl<'a> FromValue<'a> for u32

source§

impl<'a> FromValue<'a> for u64

source§

impl<'a> FromValue<'a> for Box<str>

source§

impl<'a> FromValue<'a> for String

source§

impl<'a> FromValue<'a> for Vec<GString>

source§

impl<'a> FromValue<'a> for Vec<String>

source§

impl<'a> FromValue<'a> for NonNull<Pointee>

source§

impl<'a> FromValue<'a> for PathBuf

source§

impl<'a> FromValue<'a> for NonZeroI8

source§

impl<'a> FromValue<'a> for NonZeroI32

source§

impl<'a> FromValue<'a> for NonZeroI64

source§

impl<'a> FromValue<'a> for NonZeroU8

source§

impl<'a> FromValue<'a> for NonZeroU32

source§

impl<'a> FromValue<'a> for NonZeroU64

source§

impl<'a, 'b> FromValue<'a> for Vec<&'b FlagsValue>

source§

type Checker = FlagsTypeChecker

source§

unsafe fn from_value(value: &'a Value) -> Self

source§

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.

source§

type Checker = ValueTypeOrNoneChecker<T, C, E>

source§

unsafe fn from_value(value: &'a Value) -> Self

Implementors§

source§

impl<'a> FromValue<'a> for &'a GStr

source§

impl<'a> FromValue<'a> for &'a Value

source§

impl<'a> FromValue<'a> for NormalizeMode

source§

impl<'a> FromValue<'a> for UnicodeBreakType

source§

impl<'a> FromValue<'a> for UnicodeScript

source§

impl<'a> FromValue<'a> for UnicodeType

source§

impl<'a> FromValue<'a> for StrV

source§

impl<'a> FromValue<'a> for BindingFlags

source§

impl<'a> FromValue<'a> for GString

source§

impl<'a> FromValue<'a> for IOCondition

source§

impl<'a> FromValue<'a> for ILong

source§

impl<'a> FromValue<'a> for ULong

source§

impl<'a> FromValue<'a> for BoxedValue

source§

impl<'a> FromValue<'a> for Value

source§

impl<'a> FromValue<'a> for Pointer

source§

impl<'a, 'b> FromValue<'a> for &'b EnumValue

source§

impl<'a, 'input: 'a> FromValue<'a> for MatchInfo<'input>