Struct glib::value::SendValue [−][src]
#[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]
impl SendValue
pub fn downcast<'a, T: FromValueOptional<'a> + SetValue + Send>(
self
) -> Result<TypedValue<T>, Self>
[src]
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.
pub fn downcast_ref<'a, T: FromValueOptional<'a> + SetValue>(
&self
) -> Option<&TypedValue<T>>
[src]
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>
pub fn downcast_ref<'a, T: FromValueOptional<'a> + SetValue>(
&self
) -> Option<&TypedValue<T>>
[src]
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.
pub fn get<'a, T: FromValueOptional<'a>>(&'a self) -> Option<T>
[src]
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.
pub fn is<'a, T: FromValueOptional<'a> + SetValue>(&self) -> bool
[src]
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
.
pub fn type_(&self) -> Type
[src]
pub fn type_(&self) -> Type
Returns the type of the value.
Trait Implementations
impl From<SendValue> for Value
[src]
impl From<SendValue> for Value
impl Clone for SendValue
[src]
impl Clone for SendValue
fn clone(&self) -> SendValue
[src]
fn clone(&self) -> SendValue
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Send for SendValue
[src]
impl Send for SendValue
impl Debug for SendValue
[src]
impl Debug for SendValue
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Deref for SendValue
[src]
impl Deref for SendValue
type Target = Value
The resulting type after dereferencing.
fn deref(&self) -> &Value
[src]
fn deref(&self) -> &Value
Dereferences the value.
impl<'a, T: ?Sized + SetValueOptional + Send> From<Option<&'a T>> for SendValue
[src]
impl<'a, T: ?Sized + SetValueOptional + Send> From<Option<&'a T>> for SendValue
impl<'a, T: ?Sized + SetValue + Send> From<&'a T> for SendValue
[src]
impl<'a, T: ?Sized + SetValue + Send> From<&'a T> for SendValue
impl<T: Send> From<TypedValue<T>> for SendValue
[src]
impl<T: Send> From<TypedValue<T>> for SendValue
fn from(value: TypedValue<T>) -> Self
[src]
fn from(value: TypedValue<T>) -> Self
Performs the conversion.
impl FromGlibPtrNone<*const GValue> for SendValue
[src]
impl FromGlibPtrNone<*const GValue> for SendValue
unsafe fn from_glib_none(ptr: *const GValue) -> Self
[src]
unsafe fn from_glib_none(ptr: *const GValue) -> Self
impl FromGlibPtrNone<*mut GValue> for SendValue
[src]
impl FromGlibPtrNone<*mut GValue> for SendValue
unsafe fn from_glib_none(ptr: *mut GValue) -> Self
[src]
unsafe fn from_glib_none(ptr: *mut GValue) -> Self
impl FromGlibPtrFull<*mut GValue> for SendValue
[src]
impl FromGlibPtrFull<*mut GValue> for SendValue
unsafe fn from_glib_full(ptr: *mut GValue) -> Self
[src]
unsafe fn from_glib_full(ptr: *mut GValue) -> Self
impl FromGlibContainerAsVec<*mut GValue, *mut *mut GValue> for SendValue
[src]
impl FromGlibContainerAsVec<*mut GValue, *mut *mut GValue> for SendValue
unsafe fn from_glib_none_num_as_vec(
ptr: *mut *mut GValue,
num: usize
) -> Vec<Self>
[src]
unsafe fn from_glib_none_num_as_vec(
ptr: *mut *mut GValue,
num: usize
) -> Vec<Self>
unsafe fn from_glib_container_num_as_vec(
ptr: *mut *mut GValue,
num: usize
) -> Vec<Self>
[src]
unsafe fn from_glib_container_num_as_vec(
ptr: *mut *mut GValue,
num: usize
) -> Vec<Self>
unsafe fn from_glib_full_num_as_vec(
ptr: *mut *mut GValue,
num: usize
) -> Vec<Self>
[src]
unsafe fn from_glib_full_num_as_vec(
ptr: *mut *mut GValue,
num: usize
) -> Vec<Self>
impl FromGlibPtrArrayContainerAsVec<*mut GValue, *mut *mut GValue> for SendValue
[src]
impl FromGlibPtrArrayContainerAsVec<*mut GValue, *mut *mut GValue> for SendValue
unsafe fn from_glib_none_as_vec(ptr: *mut *mut GValue) -> Vec<Self>
[src]
unsafe fn from_glib_none_as_vec(ptr: *mut *mut GValue) -> Vec<Self>
unsafe fn from_glib_container_as_vec(ptr: *mut *mut GValue) -> Vec<Self>
[src]
unsafe fn from_glib_container_as_vec(ptr: *mut *mut GValue) -> Vec<Self>
unsafe fn from_glib_full_as_vec(ptr: *mut *mut GValue) -> Vec<Self>
[src]
unsafe fn from_glib_full_as_vec(ptr: *mut *mut GValue) -> Vec<Self>
impl FromGlibContainerAsVec<*mut GValue, *const *mut GValue> for SendValue
[src]
impl FromGlibContainerAsVec<*mut GValue, *const *mut GValue> for SendValue
unsafe fn from_glib_none_num_as_vec(
ptr: *const *mut GValue,
num: usize
) -> Vec<Self>
[src]
unsafe fn from_glib_none_num_as_vec(
ptr: *const *mut GValue,
num: usize
) -> Vec<Self>
unsafe fn from_glib_container_num_as_vec(
_: *const *mut GValue,
_: usize
) -> Vec<Self>
[src]
unsafe fn from_glib_container_num_as_vec(
_: *const *mut GValue,
_: usize
) -> Vec<Self>
unsafe fn from_glib_full_num_as_vec(
_: *const *mut GValue,
_: usize
) -> Vec<Self>
[src]
unsafe fn from_glib_full_num_as_vec(
_: *const *mut GValue,
_: usize
) -> Vec<Self>
impl FromGlibPtrArrayContainerAsVec<*mut GValue, *const *mut GValue> for SendValue
[src]
impl FromGlibPtrArrayContainerAsVec<*mut GValue, *const *mut GValue> for SendValue
unsafe fn from_glib_none_as_vec(ptr: *const *mut GValue) -> Vec<Self>
[src]
unsafe fn from_glib_none_as_vec(ptr: *const *mut GValue) -> Vec<Self>
unsafe fn from_glib_container_as_vec(_: *const *mut GValue) -> Vec<Self>
[src]
unsafe fn from_glib_container_as_vec(_: *const *mut GValue) -> Vec<Self>
unsafe fn from_glib_full_as_vec(_: *const *mut GValue) -> Vec<Self>
[src]
unsafe fn from_glib_full_as_vec(_: *const *mut GValue) -> Vec<Self>
impl<'a> ToGlibPtrMut<'a, *mut GValue> for SendValue
[src]
impl<'a> ToGlibPtrMut<'a, *mut GValue> for SendValue
type Storage = &'a mut SendValue
fn to_glib_none_mut(&'a mut self) -> StashMut<'a, *mut GValue, Self>
[src]
fn to_glib_none_mut(&'a mut self) -> StashMut<'a, *mut GValue, Self>
Transfer: none. Read more
impl ToSendValue for SendValue
[src]
impl ToSendValue for SendValue
fn to_send_value(&self) -> SendValue
[src]
fn to_send_value(&self) -> SendValue
Returns a SendValue
clone of self
.
impl ToValue for SendValue
[src]
impl ToValue for SendValue