AUDIO
Source snapshot · 12 October 2026

API reference / ravet_device::RecoveringReclaimableClockedDuplex

Struct RecoveringReclaimableClockedDuplex 

pub struct RecoveringReclaimableClockedDuplex<P: Processor + Send + 'static> { /* private fields */ }
Expand description

Explicit selected-ID recovery with original processor ownership. Control service never invokes restoration or opens while old callbacks are pending. No timer, fallback, automatic state migration or physical hotplug guarantee. Restoration runs only after a receipt and before fresh preparation; its error preserves P. Foreign restoration/deactivation panic loses recovery, never a false receipt.

use ravet_device::{RecoveringReclaimableClockedDuplex,
    ReclaimableClockedRecoveryStatus, ClockedRecoveryFailure};
use ravet_foundation::Processor;
fn service<P: Processor + Send + 'static>(session:
    &mut RecoveringReclaimableClockedDuplex<P>)
    -> Result<ReclaimableClockedRecoveryStatus,
        ClockedRecoveryFailure<std::convert::Infallible>>
{
    session.service(|processor, _receipt| {
        // Caller-selected policy, invoked only after old callbacks retire.
        processor.reset();
        Ok(())
    })
}

Implementations§

§

impl<P: Processor + Send + 'static> RecoveringReclaimableClockedDuplex<P>

pub fn new( input_id: impl Into<String>, output_id: impl Into<String>, input_config: StreamConfig, output_config: StreamConfig, ring_frames: usize, processor: P, options: ClockedDuplexOptions, ) -> Result<Self, ReclaimableClockedRecoveryConstructionFailure<P>>

pub fn status(&self) -> ReclaimableClockedRecoveryStatus

pub fn request_reopen(&mut self)

Stop a healthy live pair, entering asynchronous proof before explicit restoration/reprepare. Disabled/owned/pending states remain unchanged.

pub fn statistics(&self) -> Option<ReclaimableClockedStatistics>

pub fn generation(&self) -> u64

pub fn set_enabled(&mut self, enabled: bool)

pub fn service<E>( &mut self, restore: impl FnOnce(&mut P, ClockedRecoveryReceipt) -> Result<(), E>, ) -> Result<ReclaimableClockedRecoveryStatus, ClockedRecoveryFailure<E>>

Caller-scheduled control work. Known live callback faults retire before device enumeration. Healthy enumeration errors retain the pair and return the original error; they do not infer device absence. Pending/disabled states only poll proof, with no enumeration, opening or restoration.

pub fn into_owner( self, ) -> Result<FailedClockedOwner<P>, ReclaimableClockedRecoveryError>

Return original owner or pending proof; never extract/seek while live/pending.

Auto Trait Implementations§

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<S, T> Duplex<S> for Twhere T: FromSample<S> + ToSample<S>,

§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<F, T> IntoSample<T> for Fwhere T: FromSample<F>,

§

fn into_sample(self) -> T

§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T, U> ToSample<U> for Twhere U: FromSample<T>,

§

fn to_sample_(self) -> U

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.