pub struct AttributedPacket {
pub attributes: Vec<Attribute>,
pub packet: Packet,
}Expand description
A packet together with what the interceptors have learned about it.
Fields§
§attributes: Vec<Attribute>What the interceptors have attached on the way, in the order they attached it.
packet: PacketThe packet itself.
Implementations§
Source§impl AttributedPacket
impl AttributedPacket
Sourcepub fn with(self, attribute: Attribute) -> Self
pub fn with(self, attribute: Attribute) -> Self
Attach attribute, taking ownership — for building a packet in one expression.
Sourcepub fn add(&mut self, attribute: Attribute) -> &mut Self
pub fn add(&mut self, attribute: Attribute) -> &mut Self
Attach attribute.
Attaching the same one twice is allowed and means nothing extra; has answers
the only question anyone asks of it.
Sourcepub fn has(&self, attribute: &Attribute) -> bool
pub fn has(&self, attribute: &Attribute) -> bool
Whether this packet carries attribute.
Compares by variant, not by value, so has(&Attribute::TargetBitrateChanged { .. }) finds
one whatever the rate is, and Attribute::Custom never satisfies a query for a built-in.
Trait Implementations§
Source§impl Clone for AttributedPacket
impl Clone for AttributedPacket
Source§fn clone(&self) -> AttributedPacket
fn clone(&self) -> AttributedPacket
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AttributedPacket
impl Debug for AttributedPacket
Auto Trait Implementations§
impl !Freeze for AttributedPacket
impl !RefUnwindSafe for AttributedPacket
impl !UnwindSafe for AttributedPacket
impl Send for AttributedPacket
impl Sync for AttributedPacket
impl Unpin for AttributedPacket
impl UnsafeUnpin for AttributedPacket
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