#[non_exhaustive]pub struct RealtimeConfig {
pub quantum: usize,
pub latency: usize,
pub fallback: Fallback,
}Expand description
The shape of a realtime endpoint.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.quantum: usizeThe frames of every callback, at most the chain’s prepared maximum block size. Each callback is one quantum; a callback of another size makes the endpoint resynchronize.
latency: usizeQuanta between submitting a quantum and playing its output: 1, 2 or 3. The endpoint adds
latency * quantum frames to the chain’s latency.
fallback: FallbackWhat plays while the helper’s output is missing.
Implementations§
Source§impl RealtimeConfig
impl RealtimeConfig
Sourcepub const fn new(quantum: usize) -> RealtimeConfig
pub const fn new(quantum: usize) -> RealtimeConfig
Quanta of quantum frames with one quantum of added latency and a silent fallback.
Sourcepub const fn with_latency(self, latency: usize) -> RealtimeConfig
pub const fn with_latency(self, latency: usize) -> RealtimeConfig
Sets the added latency in quanta.
Sourcepub const fn with_fallback(self, fallback: Fallback) -> RealtimeConfig
pub const fn with_fallback(self, fallback: Fallback) -> RealtimeConfig
Sets the fallback.
Trait Implementations§
Source§impl Clone for RealtimeConfig
impl Clone for RealtimeConfig
impl Copy for RealtimeConfig
Source§impl Debug for RealtimeConfig
impl Debug for RealtimeConfig
impl Eq for RealtimeConfig
Source§impl PartialEq for RealtimeConfig
impl PartialEq for RealtimeConfig
impl StructuralPartialEq for RealtimeConfig
Auto Trait Implementations§
impl Forget for RealtimeConfig
impl Freeze for RealtimeConfig
impl Move for RealtimeConfig
impl RefUnwindSafe for RealtimeConfig
impl Send for RealtimeConfig
impl Sync for RealtimeConfig
impl Unpin for RealtimeConfig
impl UnsafeUnpin for RealtimeConfig
impl UnwindSafe for RealtimeConfig
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more