Struct vapoursynth::plugin::Plugin
source · [−]pub struct Plugin<'core> { /* private fields */ }
Expand description
A VapourSynth plugin.
Implementations
sourceimpl<'core> Plugin<'core>
impl<'core> Plugin<'core>
sourcepub fn functions(&self) -> OwnedMap<'core>
pub fn functions(&self) -> OwnedMap<'core>
Returns a map containing a list of the filters exported by a plugin.
Keys: the filter names;
Values: the filter name followed by its argument string, separated by a semicolon.
sourcepub fn path(&self) -> Option<&'core CStr>
pub fn path(&self) -> Option<&'core CStr>
Returns the absolute path to the plugin, including the plugin’s file name. This is the real location of the plugin, i.e. there are no symbolic links in the path.
Path elements are always delimited with forward slashes.
sourcepub fn invoke(
&self,
name: &str,
args: &Map<'core>
) -> Result<OwnedMap<'core>, NulError>
pub fn invoke(
&self,
name: &str,
args: &Map<'core>
) -> Result<OwnedMap<'core>, NulError>
Invokes a filter.
invoke()
makes sure the filter has no compat input nodes, checks that the args passed to
the filter are consistent with the argument list registered by the plugin that contains the
filter, creates the filter, and checks that the filter doesn’t return any compat nodes. If
everything goes smoothly, the filter will be ready to generate frames after invoke()
returns.
Returns a map containing the filter’s return value(s). Use Map::error()
to check if the
filter was invoked successfully.
Most filters will either add an error to the map, or one or more clips with the key clip
.
The exception to this are functions, for example LoadPlugin
, which doesn’t return any
clips for obvious reasons.
sourcepub fn register_function<F: FilterFunction>(
&self,
filter_function: F
) -> Result<(), NulError>
pub fn register_function<F: FilterFunction>(
&self,
filter_function: F
) -> Result<(), NulError>
Registers a filter function to be exported by a non-readonly plugin.
Trait Implementations
impl<'core> Copy for Plugin<'core>
impl<'core> Send for Plugin<'core>
impl<'core> Sync for Plugin<'core>
Auto Trait Implementations
impl<'core> RefUnwindSafe for Plugin<'core>
impl<'core> Unpin for Plugin<'core>
impl<'core> UnwindSafe for Plugin<'core>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more