[−][src]Enum kpal_plugin::Val
A wrapper type for transporting Values through the plugin API.
Unlike the Value
enum, this type is intended to be sent through the FFI. Because of this, the
enum variants can only contain C-compatible datatypes.
Variants
Int(c_int)
Double(c_double)
Uint(c_uint)
Methods
impl Val
[src]
pub fn to_value(&self) -> Result<Value, ValueConversionError>
[src]
Clones the data inside a Val into a new Value type.
This method is used to convert Vals, which pass through the FFI, into owned Value datatypes. Wrapped data that is not Copy is necessarily cloned when the new Value instance is created.
Trait Implementations
impl Clone for Val
[src]
impl Debug for Val
[src]
impl PartialEq<Val> for Val
[src]
impl StructuralPartialEq for Val
[src]
Auto Trait Implementations
impl RefUnwindSafe for Val
impl !Send for Val
impl !Sync for Val
impl Unpin for Val
impl UnwindSafe for Val
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,