[−][src]Struct glib::value::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][−]
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.
pub fn downcast_ref<'a, T: FromValueOptional<'a> + SetValue>(
&self
) -> Option<&TypedValue<T>>
[src][−]
&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>
pub fn downcast_ref<'a, T: FromValueOptional<'a> + SetValue>(
&self
) -> Option<&TypedValue<T>>
[src][−]
&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.
pub fn get<'a, T: FromValueOptional<'a>>(
&'a self
) -> Result<Option<T>, GetError>
[src][−]
&'a self
) -> Result<Option<T>, GetError>
Tries to get a possibly optional value of type T
.
Returns Ok
if the type is correct.
pub fn get_some<'a, T: FromValue<'a>>(&'a self) -> Result<T, GetError>
[src][−]
Tries to get a value of type T
.
This method is only available for types that don't support a None
value.
Returns Ok
if the type is correct.
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.
pub fn transform<T: StaticType + SetValue>(&self) -> Option<Value>
[src][−]
Tries to transform the value into a value of the target type
Trait Implementations
impl Clone for SendValue
[src][+]
impl Debug for SendValue
[src][+]
impl Deref for SendValue
[src][+]
impl<'a, T: ?Sized + SetValue + Send> From<&'a T> for SendValue
[src][+]
impl<'a, T: ?Sized + SetValueOptional + Send> From<Option<&'a T>> for SendValue
[src][+]
impl From<SendValue> for Value
[src][+]
impl<T: Send> From<TypedValue<T>> for SendValue
[src][+]
impl FromGlibContainerAsVec<*mut GValue, *const *mut GValue> for SendValue
[src][+]
impl FromGlibContainerAsVec<*mut GValue, *mut *mut GValue> for SendValue
[src][+]
impl FromGlibPtrArrayContainerAsVec<*mut GValue, *const *mut GValue> for SendValue
[src][+]
impl FromGlibPtrArrayContainerAsVec<*mut GValue, *mut *mut GValue> for SendValue
[src][+]
impl FromGlibPtrFull<*mut GValue> for SendValue
[src][+]
impl FromGlibPtrNone<*const GValue> for SendValue
[src][+]
impl FromGlibPtrNone<*mut GValue> for SendValue
[src][+]
impl Send for SendValue
[src]
impl ToSendValue for SendValue
[src][+]
impl ToValue for SendValue
[src][+]
Auto Trait Implementations
impl RefUnwindSafe for SendValue
impl !Sync for SendValue
impl Unpin for SendValue
impl UnwindSafe for SendValue
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T> ToSendValue for T where
T: ToValue + SetValue + Send + ?Sized,
[src][+]
T: ToValue + SetValue + Send + ?Sized,
impl<T> ToValue for T where
T: SetValue + ?Sized,
[src][+]
T: SetValue + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,