#[repr(C)]pub enum Value {
Int(c_int),
Double(c_double),
String(CString),
Uint(c_uint),
}
Expand description
An owned value of an attribute.
Unlike the Val
enum, these are intended to be owned by an instance of a PluginData struct and
do not pass through the FFI.
Variants§
Implementations§
Source§impl Value
impl Value
Sourcepub fn as_val(&self) -> Val
pub fn as_val(&self) -> Val
Returns a reference type to a Value.
as_val creates a new Val instance from a Value. Value variants that contain datatypes that implement Copy are copied into the new Val instance. For complex datatypes that are not Copy, pointers to the data are embedded inside the Val instance instead.
This method is used to generate datatypes that represent attribute values and that may pass through the FFI.
Trait Implementations§
impl StructuralPartialEq for Value
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more