Skip to main content

SlideSourceFfi

Trait SlideSourceFfi 

Source
pub trait SlideSourceFfi: Send + Sync {
    // Required method
    fn open(&self, request_json: RStr<'_>) -> FfiResult<SlideBox>;
}
Expand description

The slide formats one plugin instance reads (see the module documentation).

Send + Sync: the host opens slides from worker threads, several at once, with none of its locks held.

Required Methods§

Source

fn open(&self, request_json: RStr<'_>) -> FfiResult<SlideBox>

Opens a slide. request_json is a JSON crate::protocol::SlideOpenRequest: which of the manifest’s formats matched, and the file path or URI.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'lt, _ErasedPtr> SlideSourceFfi for SlideSourceFfi_TO<'lt, _ErasedPtr>
where Self: Send + Sync, _ErasedPtr: AsPtr<PtrTarget = ()>,