Skip to main content

PreparedOutput

Struct PreparedOutput 

Source
pub struct PreparedOutput<M, D>(/* private fields */);
Expand description

Owns the actual begun muxer and destination without publishing its header. Dropping it abandons only private preparation. Publication consumes the token.

Implementations§

Source§

impl<M: Muxer, D: Destination> PreparedOutput<M, D>

Source

pub fn new( mux: M, destination: D, tracks: &[TrackInfo], pulse: Option<&dyn Pulse>, ) -> Result<Self, Failure>

Require exact packet timing from the actual muxer, or fail before writing.

Source

pub const fn timing(&self) -> MuxTiming

Timing/layout of the retained muxer. Streaming bytes do not certify safe backpressure against an upstream encoder’s raw-buffer ownership.

Source

pub fn facts(&self) -> DestinationFacts

Facts of this exact preparation for policy and diagnostics. No bytes are written, and the prepared muxer/writer remain owned by this object.

Source

pub fn publish(self, pulse: Option<&dyn Pulse>) -> Result<Output<M, D>, Failure>

Publish the retained header; any failure consumes the preparation.

Auto Trait Implementations§

§

impl<M, D> Freeze for PreparedOutput<M, D>
where D: Freeze, M: Freeze,

§

impl<M, D> RefUnwindSafe for PreparedOutput<M, D>

§

impl<M, D> Send for PreparedOutput<M, D>
where D: Send, M: Send,

§

impl<M, D> Sync for PreparedOutput<M, D>
where D: Sync, M: Sync,

§

impl<M, D> Unpin for PreparedOutput<M, D>
where D: Unpin, M: Unpin,

§

impl<M, D> UnsafeUnpin for PreparedOutput<M, D>
where D: UnsafeUnpin, M: UnsafeUnpin,

§

impl<M, D> UnwindSafe for PreparedOutput<M, D>
where D: UnwindSafe, M: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.