[][src]Enum kpal_plugin::Value

#[repr(C)]
pub enum Value {
    Int(c_int),
    Double(c_double),
    String(CString),
    Uint(c_uint),
}

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

Int(c_int)
Double(c_double)
String(CString)
Uint(c_uint)

Methods

impl Value[src]

pub fn as_val(&self) -> Val[src]

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 Clone for Value[src]

impl Debug for Value[src]

impl PartialEq<Value> for Value[src]

impl StructuralPartialEq for Value[src]

Auto Trait Implementations

impl RefUnwindSafe for Value

impl Send for Value

impl Sync for Value

impl Unpin for Value

impl UnwindSafe for Value

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.