Struct vapoursynth::api::API
[−]
[src]
pub struct API { /* fields omitted */ }
A wrapper for the VapourSynth API.
Methods
impl API
[src]
pub fn get() -> Option<Self>
[src]
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.
pub fn log(
self,
message_type: MessageType,
message: &str
) -> Result<(), NulError>
[src]
self,
message_type: MessageType,
message: &str
) -> Result<(), NulError>
Sends a message through VapourSynth’s logging framework.
pub fn set_message_handler<F>(self, callback: F) where
F: FnMut(MessageType, &CStr) + Send + 'static,
[src]
F: FnMut(MessageType, &CStr) + Send + 'static,
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.
pub fn set_message_handler_trivial(self, callback: fn(_: MessageType, _: &CStr))
[src]
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.
pub fn clear_message_handler(self)
[src]
Clears any custom message handler, restoring the default one.
Trait Implementations
impl Debug for API
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for API
[src]
fn clone(&self) -> API
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more