pub struct API { /* private fields */ }
Expand description

A wrapper for the VapourSynth API.

Implementations

Retrieves the VapourSynth API.

Returns None on error, for example if the requested API version (selected with features, see the crate-level docs) is not supported.

Sends a message through VapourSynth’s logging framework.

👎 Deprecated:

use add_message_handler and remove_message_handler instead

Installs a custom handler for the various error messages VapourSynth emits. The message handler is currently global, i.e. per process, not per VSCore instance.

The default message handler simply sends the messages to the standard error stream.

The callback arguments are the message type and the message itself. If the callback panics, the process is aborted.

This function allocates to store the callback, this memory is leaked if the message handler is subsequently changed.

Installs a custom handler for the various error messages VapourSynth emits. The message handler is currently global, i.e. per process, not per VSCore instance.

The unique ID for the handler is returned, which can be used to remove it using remove_message_handler.

If no error handler is installed the messages are sent to the standard error stream.

The callback arguments are the message type and the message itself. If the callback panics, the process is aborted.

👎 Deprecated:

use add_message_handler_trivial and remove_message_handler instead

Installs a custom handler for the various error messages VapourSynth emits. The message handler is currently global, i.e. per process, not per VSCore instance.

The default message handler simply sends the messages to the standard error stream.

The callback arguments are the message type and the message itself. If the callback panics, the process is aborted.

This version does not allocate at the cost of accepting a function pointer rather than an arbitrary closure. It can, however, be used with simple closures.

Installs a custom handler for the various error messages VapourSynth emits. The message handler is currently global, i.e. per process, not per VSCore instance.

The unique ID for the handler is returned, which can be used to remove it using remove_message_handler.

If no error handler is installed the messages are sent to the standard error stream.

The callback arguments are the message type and the message itself. If the callback panics, the process is aborted.

This version does not allocate at the cost of accepting a function pointer rather than an arbitrary closure. It can, however, be used with simple closures.

👎 Deprecated:

use add_message_handler and remove_message_handler instead

Clears any custom message handler, restoring the default one.

Clears a custom message handler.

If this is the only custom message handler, this will restore the default one.

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) vapoursynth_sys::VSAPI::freeCore() after ensuring that all frame requests have completed and all objects belonging to the core have been released.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.