#[non_exhaustive]pub struct Limits {
pub announces: usize,
pub live_edges: Option<u64>,
}Expand description
Bounds on what one peer can make a session hold, where its transport does not already.
Each request holds a stream of its own, so the transport’s stream credit bounds those.
A peer that announces past announces loses the session, closed with
TOO_MANY_REQUESTS. The stats sessions rows report announcement and subscription peaks.
let mut limits = moq_net::session::Limits::default();
limits.announces = 1_000;
limits.live_edges = Some(256 << 20);
let client = moq_net::Client::new().with_limits(limits);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.announces: usizeBroadcasts (moq-lite) or namespaces (moq-transport) the peer may have announced to us.
live_edges: Option<u64>Bytes the newest group of every track we receive from the peer may hold in all.
The cache never evicts a live track’s newest group, so a peer holding many quiet
tracks would otherwise hold one group each past any cache capacity. Past this, the
session sheds its own live edges in delivery’s priority order, the lowest-priority
track and then the edge that moved longest ago first: the frames readers took (a
compressed track’s inflated copies aside), then whole edges, of which the one being
written keeps its newest frame. None leaves them unbounded.
Trait Implementations§
impl Copy for Limits
impl Eq for Limits
impl StructuralPartialEq for Limits
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnsafeUnpin for Limits
impl UnwindSafe for Limits
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.