[][src]Struct glib::value::SendValue

#[repr(C)]
pub struct SendValue(_);

A version of Value for storing Send types, that implements Send itself.

See the module documentation for more details.

Methods

impl SendValue[src]

pub fn downcast<'a, T: FromValueOptional<'a> + SetValue + Send>(
    self
) -> Result<TypedValue<T>, Self>
[src]

Tries to downcast to a TypedValue.

Returns Ok(TypedValue<T>) if the value carries a type corresponding to T and Err(self) otherwise.

pub fn downcast_ref<'a, T: FromValueOptional<'a> + SetValue>(
    &self
) -> Option<&TypedValue<T>>
[src]

Tries to downcast to a &TypedValue.

Returns Some(&TypedValue<T>) if the value carries a type corresponding to T and None otherwise.

Methods from Deref<Target = Value>

pub fn downcast_ref<'a, T: FromValueOptional<'a> + SetValue>(
    &self
) -> Option<&TypedValue<T>>
[src]

Tries to downcast to a &TypedValue.

Returns Some(&TypedValue<T>) if the value carries a type corresponding to T and None otherwise.

pub fn get<'a, T: FromValueOptional<'a>>(&'a self) -> Option<T>[src]

Tries to get a value of type T.

Returns Some if the type is correct and the value is not None.

This function doesn't distinguish between type mismatches and correctly typed None values. Use downcast or is for that.

pub fn is<'a, T: FromValueOptional<'a> + SetValue>(&self) -> bool[src]

Returns true if the type of the value corresponds to T or is a sub-type of T.

pub fn type_(&self) -> Type[src]

Returns the type of the value.

Trait Implementations

impl FromGlibPtrNone<*const GValue> for SendValue[src]

impl FromGlibPtrNone<*mut GValue> for SendValue[src]

impl FromGlibPtrFull<*mut GValue> for SendValue[src]

impl FromGlibContainerAsVec<*mut GValue, *mut *mut GValue> for SendValue[src]

impl FromGlibContainerAsVec<*mut GValue, *const *mut GValue> for SendValue[src]

impl FromGlibPtrArrayContainerAsVec<*mut GValue, *mut *mut GValue> for SendValue[src]

impl FromGlibPtrArrayContainerAsVec<*mut GValue, *const *mut GValue> for SendValue[src]

impl ToValue for SendValue[src]

impl ToSendValue for SendValue[src]

impl From<SendValue> for Value[src]

impl<'a, T: ?Sized + SetValueOptional + Send> From<Option<&'a T>> for SendValue[src]

impl<'a, T: ?Sized + SetValue + Send> From<&'a T> for SendValue[src]

impl<T: Send> From<TypedValue<T>> for SendValue[src]

impl Clone for SendValue[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Send for SendValue[src]

impl Deref for SendValue[src]

type Target = Value

The resulting type after dereferencing.

impl Debug for SendValue[src]

Auto Trait Implementations

impl !Sync for SendValue

Blanket Implementations

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]