pub struct Versions(/* private fields */);Expand description
A set of supported MoQ versions.
Implementations§
Source§impl Versions
impl Versions
Sourcepub fn all() -> Self
pub fn all() -> Self
All versions exposed by default.
Lite06Wip is intentionally excluded: its wire format is still work-in-progress,
so it is not advertised until a caller opts in explicitly (e.g. a pinned
version = ["moq-lite-06-wip"]). It is otherwise a fully-defined version, so an
opt-in set that includes it negotiates normally.
Sourcepub fn alpns(&self) -> Vec<&'static str>
pub fn alpns(&self) -> Vec<&'static str>
Compute the unique ALPN strings needed for these versions.
Sourcepub fn filter(&self, other: &Versions) -> Option<Versions>
pub fn filter(&self, other: &Versions) -> Option<Versions>
Return only versions present in both self and other, or None if the intersection is empty.
Sourcepub fn select(&self, version: Version) -> Option<Version>
pub fn select(&self, version: Version) -> Option<Version>
Check if a specific version is in this set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Versions
impl RefUnwindSafe for Versions
impl Send for Versions
impl Sync for Versions
impl Unpin for Versions
impl UnsafeUnpin for Versions
impl UnwindSafe for Versions
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
Mutably borrows from an owned value. Read more