Struct gstreamer_video::Value [−][src]
#[repr(C)]pub struct Value(_, _);
A generic value capable of carrying various types.
Once created the type of the value can't be changed.
Some types (e.g. String and objects) support None values while others
(e.g. numeric types) don't.
Value does not implement the Send trait, but SendValue can be
used instead.
See the module documentation for more details.
Methods
impl Value[src]
impl Valuepub fn from_type(type_: Type) -> Value[src]
pub fn from_type(type_: Type) -> ValueCreates a new Value that is initialized with type_
pub fn downcast<'a, T>(self) -> Result<TypedValue<T>, Value> where
T: FromValueOptional<'a> + SetValue, [src]
pub fn downcast<'a, T>(self) -> Result<TypedValue<T>, Value> where
T: FromValueOptional<'a> + SetValue, 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>(&self) -> Option<&TypedValue<T>> where
T: FromValueOptional<'a> + SetValue, [src]
pub fn downcast_ref<'a, T>(&self) -> Option<&TypedValue<T>> where
T: FromValueOptional<'a> + SetValue, 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>(&'a self) -> Option<T> where
T: FromValueOptional<'a>, [src]
pub fn get<'a, T>(&'a self) -> Option<T> where
T: FromValueOptional<'a>, 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>(&self) -> bool where
T: FromValueOptional<'a> + SetValue, [src]
pub fn is<'a, T>(&self) -> bool where
T: FromValueOptional<'a> + SetValue, 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) -> TypeReturns the type of the value.
pub fn type_transformable(src: Type, dst: Type) -> bool[src]
pub fn type_transformable(src: Type, dst: Type) -> boolReturns whether Values of type src can be transformed to type dst.
pub fn try_into_send_value<'a, T>(self) -> Result<SendValue, Value> where
T: FromValueOptional<'a> + SetValue + Send, [src]
pub fn try_into_send_value<'a, T>(self) -> Result<SendValue, Value> where
T: FromValueOptional<'a> + SetValue + Send, Trait Implementations
impl<'a, T> From<&'a T> for Value where
T: SetValue + ?Sized, [src]
impl<'a, T> From<&'a T> for Value where
T: SetValue + ?Sized, impl<T> From<TypedValue<T>> for Value[src]
impl<T> From<TypedValue<T>> for Valuefn from(value: TypedValue<T>) -> Value[src]
fn from(value: TypedValue<T>) -> ValuePerforms the conversion.
impl From<SendValue> for Value[src]
impl From<SendValue> for Valueimpl<'a, T> From<Option<&'a T>> for Value where
T: SetValueOptional + ?Sized, [src]
impl<'a, T> From<Option<&'a T>> for Value where
T: SetValueOptional + ?Sized, impl Clone for Value[src]
impl Clone for Valuefn clone(&self) -> Value[src]
fn clone(&self) -> ValueReturns 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 FromGlibPtrNone<*const GValue> for Value[src]
impl FromGlibPtrNone<*const GValue> for Valueunsafe fn from_glib_none(ptr: *const GValue) -> Value[src]
unsafe fn from_glib_none(ptr: *const GValue) -> Valueimpl FromGlibPtrNone<*mut GValue> for Value[src]
impl FromGlibPtrNone<*mut GValue> for Valueunsafe fn from_glib_none(ptr: *mut GValue) -> Value[src]
unsafe fn from_glib_none(ptr: *mut GValue) -> Valueimpl Drop for Value[src]
impl Drop for Valueimpl ToValue for Value[src]
impl ToValue for Valuefn to_value(&self) -> Value[src]
fn to_value(&self) -> ValueReturns a Value clone of self.
fn to_value_type(&self) -> Type[src]
fn to_value_type(&self) -> TypeReturns the type identifer of self. Read more
impl<'a> ToGlibContainerFromSlice<'a, *const GValue> for &'a Value[src]
impl<'a> ToGlibContainerFromSlice<'a, *const GValue> for &'a Valuetype Storage = &'a [&'a Value]
fn to_glib_none_from_slice(
t: &'a [&'a Value]
) -> (*const GValue, &'a [&'a Value])[src]
fn to_glib_none_from_slice(
t: &'a [&'a Value]
) -> (*const GValue, &'a [&'a Value])fn to_glib_container_from_slice(
&'a [&'a Value]
) -> (*const GValue, &'a [&'a Value])[src]
fn to_glib_container_from_slice(
&'a [&'a Value]
) -> (*const GValue, &'a [&'a Value])fn to_glib_full_from_slice(&[&'a Value]) -> *const GValue[src]
fn to_glib_full_from_slice(&[&'a Value]) -> *const GValueimpl<'a> ToGlibContainerFromSlice<'a, *mut GValue> for &'a Value[src]
impl<'a> ToGlibContainerFromSlice<'a, *mut GValue> for &'a Valuetype Storage = &'a [&'a Value]
fn to_glib_none_from_slice(t: &'a [&'a Value]) -> (*mut GValue, &'a [&'a Value])[src]
fn to_glib_none_from_slice(t: &'a [&'a Value]) -> (*mut GValue, &'a [&'a Value])fn to_glib_container_from_slice(
t: &'a [&'a Value]
) -> (*mut GValue, &'a [&'a Value])[src]
fn to_glib_container_from_slice(
t: &'a [&'a Value]
) -> (*mut GValue, &'a [&'a Value])fn to_glib_full_from_slice(t: &[&'a Value]) -> *mut GValue[src]
fn to_glib_full_from_slice(t: &[&'a Value]) -> *mut GValueimpl FromGlibContainerAsVec<*mut GValue, *mut *mut GValue> for Value[src]
impl FromGlibContainerAsVec<*mut GValue, *mut *mut GValue> for Valueunsafe fn from_glib_none_num_as_vec(
ptr: *mut *mut GValue,
num: usize
) -> Vec<Value>[src]
unsafe fn from_glib_none_num_as_vec(
ptr: *mut *mut GValue,
num: usize
) -> Vec<Value>unsafe fn from_glib_container_num_as_vec(
ptr: *mut *mut GValue,
num: usize
) -> Vec<Value>[src]
unsafe fn from_glib_container_num_as_vec(
ptr: *mut *mut GValue,
num: usize
) -> Vec<Value>unsafe fn from_glib_full_num_as_vec(
ptr: *mut *mut GValue,
num: usize
) -> Vec<Value>[src]
unsafe fn from_glib_full_num_as_vec(
ptr: *mut *mut GValue,
num: usize
) -> Vec<Value>impl FromGlibContainerAsVec<*mut GValue, *const *mut GValue> for Value[src]
impl FromGlibContainerAsVec<*mut GValue, *const *mut GValue> for Valueunsafe fn from_glib_none_num_as_vec(
ptr: *const *mut GValue,
num: usize
) -> Vec<Value>[src]
unsafe fn from_glib_none_num_as_vec(
ptr: *const *mut GValue,
num: usize
) -> Vec<Value>unsafe fn from_glib_container_num_as_vec(
*const *mut GValue,
usize
) -> Vec<Value>[src]
unsafe fn from_glib_container_num_as_vec(
*const *mut GValue,
usize
) -> Vec<Value>unsafe fn from_glib_full_num_as_vec(*const *mut GValue, usize) -> Vec<Value>[src]
unsafe fn from_glib_full_num_as_vec(*const *mut GValue, usize) -> Vec<Value>impl<'a> ToGlibPtrMut<'a, *mut GValue> for Value[src]
impl<'a> ToGlibPtrMut<'a, *mut GValue> for Valuetype Storage = &'a mut Value
fn to_glib_none_mut(&'a mut self) -> StashMut<'a, *mut GValue, Value>[src]
fn to_glib_none_mut(&'a mut self) -> StashMut<'a, *mut GValue, Value>Transfer: none. Read more
impl Debug for Value[src]
impl Debug for Valuefn 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 Uninitialized for Value[src]
impl Uninitialized for Valueunsafe fn uninitialized() -> Value[src]
unsafe fn uninitialized() -> ValueReturns an uninitialized value.
impl FromGlibPtrFull<*mut GValue> for Value[src]
impl FromGlibPtrFull<*mut GValue> for Valueunsafe fn from_glib_full(ptr: *mut GValue) -> Value[src]
unsafe fn from_glib_full(ptr: *mut GValue) -> Valueimpl FromGlibPtrArrayContainerAsVec<*mut GValue, *const *mut GValue> for Value[src]
impl FromGlibPtrArrayContainerAsVec<*mut GValue, *const *mut GValue> for Valueunsafe fn from_glib_none_as_vec(ptr: *const *mut GValue) -> Vec<Value>[src]
unsafe fn from_glib_none_as_vec(ptr: *const *mut GValue) -> Vec<Value>unsafe fn from_glib_container_as_vec(*const *mut GValue) -> Vec<Value>[src]
unsafe fn from_glib_container_as_vec(*const *mut GValue) -> Vec<Value>unsafe fn from_glib_full_as_vec(*const *mut GValue) -> Vec<Value>[src]
unsafe fn from_glib_full_as_vec(*const *mut GValue) -> Vec<Value>impl FromGlibPtrArrayContainerAsVec<*mut GValue, *mut *mut GValue> for Value[src]
impl FromGlibPtrArrayContainerAsVec<*mut GValue, *mut *mut GValue> for Valueunsafe fn from_glib_none_as_vec(ptr: *mut *mut GValue) -> Vec<Value>[src]
unsafe fn from_glib_none_as_vec(ptr: *mut *mut GValue) -> Vec<Value>unsafe fn from_glib_container_as_vec(ptr: *mut *mut GValue) -> Vec<Value>[src]
unsafe fn from_glib_container_as_vec(ptr: *mut *mut GValue) -> Vec<Value>unsafe fn from_glib_full_as_vec(ptr: *mut *mut GValue) -> Vec<Value>[src]
unsafe fn from_glib_full_as_vec(ptr: *mut *mut GValue) -> Vec<Value>impl<'a> ToGlibPtr<'a, *const GValue> for Value[src]
impl<'a> ToGlibPtr<'a, *const GValue> for Valuetype Storage = &'a Value
fn to_glib_none(&'a self) -> Stash<'a, *const GValue, Value>[src]
fn to_glib_none(&'a self) -> Stash<'a, *const GValue, Value>Transfer: none. Read more
fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>Transfer: container. Read more
fn to_glib_full(&self) -> P[src]
fn to_glib_full(&self) -> PTransfer: full. Read more
impl GstValueExt for Value[src]
impl GstValueExt for Valuefn can_compare(&self, other: &Value) -> bool[src]
fn can_compare(&self, other: &Value) -> boolfn compare(&self, other: &Value) -> Option<Ordering>[src]
fn compare(&self, other: &Value) -> Option<Ordering>fn eq(&self, other: &Value) -> bool[src]
fn eq(&self, other: &Value) -> boolfn can_intersect(&self, other: &Value) -> bool[src]
fn can_intersect(&self, other: &Value) -> boolfn intersect(&self, other: &Value) -> Option<Value>[src]
fn intersect(&self, other: &Value) -> Option<Value>fn can_subtract(&self, other: &Value) -> bool[src]
fn can_subtract(&self, other: &Value) -> boolfn subtract(&self, other: &Value) -> Option<Value>[src]
fn subtract(&self, other: &Value) -> Option<Value>fn can_union(&self, other: &Value) -> bool[src]
fn can_union(&self, other: &Value) -> boolfn union(&self, other: &Value) -> Option<Value>[src]
fn union(&self, other: &Value) -> Option<Value>fn fixate(&self) -> Option<Value>[src]
fn fixate(&self) -> Option<Value>fn is_fixed(&self) -> bool[src]
fn is_fixed(&self) -> boolfn is_subset(&self, superset: &Value) -> bool[src]
fn is_subset(&self, superset: &Value) -> boolfn serialize(&self) -> Option<String>[src]
fn serialize(&self) -> Option<String>fn deserialize<'a, T>(s: T) -> Option<Value> where
T: Into<&'a str>, [src]
fn deserialize<'a, T>(s: T) -> Option<Value> where
T: Into<&'a str>,