#[repr(C)]
pub struct VSSCRIPTAPI {
Show 15 fields pub getApiVersion: unsafe extern "system" fn() -> c_int, pub getVSAPI: unsafe extern "system" fn(version: c_int) -> *const VSAPI, pub createScript: unsafe extern "system" fn(core: *mut VSCore) -> *mut VSScript, pub getCore: unsafe extern "system" fn(handle: *mut VSScript) -> *mut VSCore, pub evaluateBuffer: unsafe extern "system" fn(handle: *mut VSScript, buffer: *const c_char, scriptFilename: *const c_char) -> c_int, pub evaluateFile: unsafe extern "system" fn(handle: *mut VSScript, scriptFilename: *const c_char) -> c_int, pub getError: unsafe extern "system" fn(handle: *mut VSScript) -> *const c_char, pub getExitCode: unsafe extern "system" fn(handle: *mut VSScript) -> c_int, pub getVariable: unsafe extern "system" fn(handle: *mut VSScript, name: *const c_char, dst: *mut VSMap) -> c_int, pub setVariable: unsafe extern "system" fn(handle: *mut VSScript, name: *const c_char, value: *const c_char) -> c_int, pub getOutputNode: unsafe extern "system" fn(handle: *mut VSScript, index: c_int) -> *mut VSNode, pub getOutputAlphaNode: unsafe extern "system" fn(handle: *mut VSScript, index: c_int) -> *mut VSNode, pub getAltOutputMode: unsafe extern "system" fn(handle: *mut VSScript, index: c_int) -> c_int, pub freeScript: unsafe extern "system" fn(handle: *mut VSScript) -> c_int, pub evalSetWorkingDir: unsafe extern "system" fn(handle: *mut VSScript, setCWD: c_int) -> c_void,
}
Available on crate feature vsscript only.

Fields§

§getApiVersion: unsafe extern "system" fn() -> c_int

Returns the highest supported VSSCRIPT_API_VERSION

§getVSAPI: unsafe extern "system" fn(version: c_int) -> *const VSAPI

Convenience function for retrieving a VSAPI pointer without having to use the VapourSynth library. Always pass VAPOURSYNTH_API_VERSION

§createScript: unsafe extern "system" fn(core: *mut VSCore) -> *mut VSScript

Providing a pre-created core is useful for setting core creation flags, log callbacks, preload specific plugins and many other things. You must create a VSScript object before evaluating a script. Always takes ownership of the core even on failure. Returns NULL on failure. Pass NULL to have a core automatically created with the default options.

§getCore: unsafe extern "system" fn(handle: *mut VSScript) -> *mut VSCore

The core is valid as long as the environment exists, return NULL on error

§evaluateBuffer: unsafe extern "system" fn(handle: *mut VSScript, buffer: *const c_char, scriptFilename: *const c_char) -> c_int

Evaluates a script passed in the buffer argument. The scriptFilename is only used for display purposes. In Python, it means that the main module won’t be unnamed in error messages.

Returns 0 on success.

Note: calling any function other than getError() and freeScript() on a VSScript object in the error state will result in undefined behavior.

§evaluateFile: unsafe extern "system" fn(handle: *mut VSScript, scriptFilename: *const c_char) -> c_int

Convenience version of the above function that loads the script from scriptFilename and passes as the buffer to evaluateBuffer

§getError: unsafe extern "system" fn(handle: *mut VSScript) -> *const c_char

Returns NULL on success, otherwise an error message

§getExitCode: unsafe extern "system" fn(handle: *mut VSScript) -> c_int

Returns the script’s reported exit code

§getVariable: unsafe extern "system" fn(handle: *mut VSScript, name: *const c_char, dst: *mut VSMap) -> c_int

Fetches a variable of any VSMap storable type set in a script. It is stored in the key with the same name in dst.

Returns 0 on success.

§setVariable: unsafe extern "system" fn(handle: *mut VSScript, name: *const c_char, value: *const c_char) -> c_int

Sets all keys in the provided VSMap as variables in the script.

Returns 0 on success.

§getOutputNode: unsafe extern "system" fn(handle: *mut VSScript, index: c_int) -> *mut VSNode

The returned nodes must be freed using freeNode() before calling freeScript() since they may depend on data in the VSScript environment. Returns NULL if no node was set as output in the script. Index 0 is used by default in scripts and other values are rarely used.

§getOutputAlphaNode: unsafe extern "system" fn(handle: *mut VSScript, index: c_int) -> *mut VSNode§getAltOutputMode: unsafe extern "system" fn(handle: *mut VSScript, index: c_int) -> c_int§freeScript: unsafe extern "system" fn(handle: *mut VSScript) -> c_int§evalSetWorkingDir: unsafe extern "system" fn(handle: *mut VSScript, setCWD: c_int) -> c_void
Available on crate feature vsscript-41 only.

Set whether or not the working directory is temporarily changed to the same location as the script file when evaluateFile is called. Off by default.

Auto Trait Implementations§

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, 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.