Struct rustsynth::core::CoreRef

source ·
pub struct CoreRef<'core> { /* private fields */ }
Expand description

A reference to a VapourSynth core.

Implementations§

source§

impl<'core> CoreRef<'core>

source

pub fn new(flags: CoreCreationFlags) -> Self

Creates and returns a new core.

Note that there’s currently no safe way of freeing the returned core, and the lifetime is unbounded, because it can live for an arbitrary long time. You may use the (unsafe) rustsynth_sys::VSAPI::freeCore() after ensuring that all frame requests have completed and all objects belonging to the core have been released.

Example
use rustsynth::core::{CoreFlags, CoreRef};
let core = CoreRef::new(CoreFlags::ENABLE_GRAPH_INSPECTION | CoreFlags::DISABLE_AUTO_LOADING)
source

pub fn info(&self) -> CoreInfo

Returns an instance of CoreInfo

Panics

Will panic if core configuration is not valid

source

pub fn plugin_by_namespace(&self, namespace: &str) -> Option<Plugin<'core>>

Returns an instance of Some(Plugin) if there exists a plugin loaded associated with the namespace

None if no plugin is found

source

pub fn plugin_by_id(&self, id: &str) -> Option<Plugin<'_>>

Returns an instance of Some(Plugin) if there exists a plugin loaded associated with the id

None if no plugin is found

source

pub fn plugins(&self) -> Plugins<'_>

Returns a iterator over the loaded plugins

source

pub fn set_thread_count(&self, count: usize) -> i32

source

pub unsafe fn free_core(self)

Consumes and frees the core and core reference

Safety

Must ensure that all frame requests have completed and all objects belonging to the core have been released.

Trait Implementations§

source§

impl<'core> Clone for CoreRef<'core>

source§

fn clone(&self) -> CoreRef<'core>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'core> Debug for CoreRef<'core>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'core> Copy for CoreRef<'core>

source§

impl<'core> Send for CoreRef<'core>

source§

impl<'core> Sync for CoreRef<'core>

Auto Trait Implementations§

§

impl<'core> RefUnwindSafe for CoreRef<'core>

§

impl<'core> Unpin for CoreRef<'core>

§

impl<'core> UnwindSafe for CoreRef<'core>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.