Skip to main content

Output

Struct Output 

Source
pub struct Output<M, D> { /* private fields */ }
Expand description

Active output driver. Any send failure or unwind makes further sends fail. finish consumes the driver; dropping it never retries effects.

Implementations§

Source§

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

Source

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

Explicitly allow the muxer’s ordinary timing behavior, then publish. This does not guarantee exact packet durations. Prefer Output::new.

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 fn facts(&self) -> DestinationFacts

Facts of the retained container/writer, unchanged by publication. Progress and partial effects are reported separately through stats/errors.

Source

pub const fn stats(&self) -> &Stats

Confirmed progress so far, including before a terminal failure.

Source

pub fn is_failed(&self) -> bool

Whether a prior failure or unwind made this driver terminal.

Source

pub fn send( &mut self, packet: Packet, pulse: Option<&dyn Pulse>, ) -> Result<(), Failure>

Validate and write one packet. Failure is terminal and preserves its cause.

Source

pub fn finish(self, pulse: Option<&dyn Pulse>) -> Result<Stats, Failure>

Preflight final patches, append the tail, apply patches and flush. A patch I/O failure can leave partial overwrites; it is not a transaction.

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

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

§

impl<M, D> UnwindSafe for Output<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.