pub trait Transcodable {
type Options: TranscodeOptions + Send;
// Required methods
fn create_download_session(
&self,
options: Self::Options,
) -> impl Future<Output = Result<TranscodeSession>> + Send;
fn create_streaming_session(
&self,
protocol: Protocol,
options: Self::Options,
) -> impl Future<Output = Result<TranscodeSession>> + Send;
fn queue_download(
&self,
options: Self::Options,
download_queue: Option<&DownloadQueue>,
) -> impl Future<Output = Result<QueueItem>> + Send;
}Required Associated Types§
type Options: TranscodeOptions + Send
Required Methods§
Sourcefn create_download_session(
&self,
options: Self::Options,
) -> impl Future<Output = Result<TranscodeSession>> + Send
fn create_download_session( &self, options: Self::Options, ) -> impl Future<Output = Result<TranscodeSession>> + Send
Starts an offline transcode using the provided options.
The server may refuse to transcode if the options suggest that the original media file can be played back directly. Sometimes starting a new download session will cancel an existing session.
Can’t be called on media other than Movie, Episode or Track.
Sourcefn create_streaming_session(
&self,
protocol: Protocol,
options: Self::Options,
) -> impl Future<Output = Result<TranscodeSession>> + Send
fn create_streaming_session( &self, protocol: Protocol, options: Self::Options, ) -> impl Future<Output = Result<TranscodeSession>> + Send
Starts a streaming transcode using of the given media part using the streaming protocol and provided options.
Can’t be called on media other than Movie, Episode or Track.
Sourcefn queue_download(
&self,
options: Self::Options,
download_queue: Option<&DownloadQueue>,
) -> impl Future<Output = Result<QueueItem>> + Send
fn queue_download( &self, options: Self::Options, download_queue: Option<&DownloadQueue>, ) -> impl Future<Output = Result<QueueItem>> + Send
Queues this item for download using the provided download queue.
This is a newer API and should be preferred over
create_download_session. Many items can be added to the same download
queue, the server will automatically transcode them if necessary based
on the limits set in the server settings.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.