Trait TryFromPlugin

Source
pub trait TryFromPlugin<'ctx, T = cell_t>: Sized {
    type Error;

    // Required method
    fn try_from_plugin(
        ctx: &'ctx IPluginContext,
        value: T,
    ) -> Result<Self, Self::Error>;
}
Expand description

Trait to support conversions to/from cell_t that require an IPluginContext for access to plugin memory.

Required Associated Types§

Required Methods§

Source

fn try_from_plugin( ctx: &'ctx IPluginContext, value: T, ) -> Result<Self, Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'ctx> TryFromPlugin<'ctx> for &'ctx str

Source§

type Error = Box<dyn Error>

Source§

fn try_from_plugin( ctx: &'ctx IPluginContext, value: cell_t, ) -> Result<Self, Self::Error>

Source§

impl<'ctx> TryFromPlugin<'ctx> for &'ctx CStr

Source§

type Error = SPError

Source§

fn try_from_plugin( ctx: &'ctx IPluginContext, value: cell_t, ) -> Result<Self, Self::Error>

Source§

impl<'ctx> TryFromPlugin<'ctx> for &'ctx mut f32

Source§

type Error = SPError

Source§

fn try_from_plugin( ctx: &'ctx IPluginContext, value: cell_t, ) -> Result<Self, Self::Error>

Source§

impl<'ctx> TryFromPlugin<'ctx> for &'ctx mut i32

Source§

type Error = SPError

Source§

fn try_from_plugin( ctx: &'ctx IPluginContext, value: cell_t, ) -> Result<Self, Self::Error>

Implementors§

Source§

impl<'ctx> TryFromPlugin<'ctx> for &'ctx mut cell_t

Source§

impl<'ctx> TryFromPlugin<'ctx> for IPluginFunction<'ctx>

Source§

impl<'ctx, 'ty, T: HasHandleType> TryFromPlugin<'ctx> for HandleRef<'ty, T>

Source§

impl<T, U> TryFromPlugin<'_, T> for U
where U: TryFrom<T>,

Source§

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