#[repr(C)]pub struct SendValue(_);Expand description
A version of Value for storing Send types, that implements Send
itself.
See the module documentation for more details.
Implementations
sourceimpl SendValue
impl SendValue
sourcepub fn downcast<'a, T: FromValueOptional<'a> + SetValue + Send>(
self
) -> Result<TypedValue<T>, Self>
pub fn downcast<'a, T: FromValueOptional<'a> + SetValue + Send>(
self
) -> Result<TypedValue<T>, Self>
Tries to downcast to a TypedValue.
Returns Ok(TypedValue<T>) if the value carries a type corresponding
to T and Err(self) otherwise.
sourcepub fn downcast_ref<'a, T: FromValueOptional<'a> + SetValue>(
&self
) -> Option<&TypedValue<T>>
pub fn downcast_ref<'a, T: FromValueOptional<'a> + SetValue>(
&self
) -> Option<&TypedValue<T>>
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>
sourcepub fn downcast_ref<'a, T: FromValueOptional<'a> + SetValue>(
&self
) -> Option<&TypedValue<T>>
pub fn downcast_ref<'a, T: FromValueOptional<'a> + SetValue>(
&self
) -> Option<&TypedValue<T>>
Tries to downcast to a &TypedValue.
Returns Some(&TypedValue<T>) if the value carries a type corresponding
to T and None otherwise.
sourcepub fn get<'a, T: FromValueOptional<'a>>(&'a self) -> Option<T>
pub fn get<'a, T: FromValueOptional<'a>>(&'a self) -> Option<T>
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.
sourcepub fn is<'a, T: FromValueOptional<'a> + SetValue>(&self) -> bool
pub fn is<'a, T: FromValueOptional<'a> + SetValue>(&self) -> bool
Returns true if the type of the value corresponds to T
or is a sub-type of T.
Trait Implementations
sourceimpl<T: Send> From<TypedValue<T>> for SendValue
impl<T: Send> From<TypedValue<T>> for SendValue
sourcefn from(value: TypedValue<T>) -> Self
fn from(value: TypedValue<T>) -> Self
sourceimpl FromGlibPtrFull<*mut GValue> for SendValue
impl FromGlibPtrFull<*mut GValue> for SendValue
unsafe fn from_glib_full(ptr: *mut GValue) -> Self
sourceimpl FromGlibPtrNone<*const GValue> for SendValue
impl FromGlibPtrNone<*const GValue> for SendValue
unsafe fn from_glib_none(ptr: *const GValue) -> Self
sourceimpl FromGlibPtrNone<*mut GValue> for SendValue
impl FromGlibPtrNone<*mut GValue> for SendValue
unsafe fn from_glib_none(ptr: *mut GValue) -> Self
sourceimpl<'a> ToGlibPtrMut<'a, *mut GValue> for SendValue
impl<'a> ToGlibPtrMut<'a, *mut GValue> for SendValue
sourceimpl ToSendValue for SendValue
impl ToSendValue for SendValue
sourcefn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue clone of self.