Struct Value

Source
pub struct Value(/* private fields */);

Implementations§

Source§

impl Value

Source

pub fn new(g_type: GType) -> Value

Source

pub fn value_type(&self) -> GType

Source

pub fn reset(&mut self)

Source

pub fn get_boolean(&self) -> bool

Source

pub fn set_boolean(&mut self, val: bool)

Source

pub fn get_char(&self) -> gchar

Source

pub fn set_char(&mut self, val: gchar)

Source

pub fn get_schar(&self) -> i8

Source

pub fn set_schar(&mut self, val: i8)

Source

pub fn get_uchar(&self) -> guchar

Source

pub fn set_uchar(&mut self, val: guchar)

Source

pub fn get_int(&self) -> gint

Source

pub fn set_int(&mut self, val: gint)

Source

pub fn get_uint(&self) -> guint

Source

pub fn set_uint(&mut self, val: guint)

Source

pub fn get_long(&self) -> glong

Source

pub fn set_long(&mut self, val: glong)

Source

pub fn get_ulong(&self) -> gulong

Source

pub fn set_ulong(&mut self, val: gulong)

Source

pub fn get_int64(&self) -> i64

Source

pub fn set_int64(&mut self, val: i64)

Source

pub fn get_uint64(&self) -> u64

Source

pub fn set_uint64(&mut self, val: u64)

Source

pub fn get_float(&self) -> gfloat

Source

pub fn set_float(&mut self, val: gfloat)

Source

pub fn get_double(&self) -> gdouble

Source

pub fn set_double(&mut self, val: gdouble)

Source

pub fn get_enum<T>(&self) -> Result<T, UnknownEnumValue>
where T: EnumType,

Source

pub fn set_enum<T>(&mut self, val: T)
where T: EnumType,

Source

pub fn get_flags<T>(&self) -> Result<T, UnknownFlags>
where T: FlagsType,

Source

pub fn set_flags<T>(&mut self, val: T)
where T: FlagsType,

Source

pub fn get_string(&self) -> Option<&CStr>

Source

pub fn set_string(&mut self, val: &CStr)

Source

pub fn set_static_string(&mut self, val: &'static CStr)

Source

pub fn take_string(&mut self, consumed: OwnedGStr)

Source

pub fn get_object<T>(&self) -> Option<&T>
where T: ObjectType,

Source

pub fn set_object<T>(&mut self, val: &T)
where T: ObjectType,

Source

pub fn dup_boxed<T>(&self) -> Option<T>
where T: BoxedType,

Source

pub fn deref_boxed<T>(&self) -> Option<&<T as Deref>::Target>
where T: BoxedType + Deref,

Source

pub fn take_boxed<T>(&mut self, val: T)
where T: BoxedType,

Trait Implementations§

Source§

impl Clone for Value

Source§

fn clone(&self) -> Value

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Value

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Value

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Value

§

impl RefUnwindSafe for Value

§

impl Send for Value

§

impl Sync for Value

§

impl Unpin for Value

§

impl UnwindSafe for Value

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> &T