pub struct Nack {
pub reason: NackReason,
pub interest: Interest,
}Expand description
An NDN Nack — a negative acknowledgement wrapping the rejected Interest.
Fields§
§reason: NackReason§interest: InterestImplementations§
Source§impl Nack
impl Nack
pub fn new(interest: Interest, reason: NackReason) -> Self
Sourcepub fn decode(raw: Bytes) -> Result<Self, PacketError>
pub fn decode(raw: Bytes) -> Result<Self, PacketError>
Decode a Nack from wire bytes.
Accepts both NDNLPv2 format (LpPacket 0x64 with Nack header) and the legacy bare Nack TLV (0x0320). Prefer LpPacket format for new code.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Nack
impl RefUnwindSafe for Nack
impl Send for Nack
impl Sync for Nack
impl Unpin for Nack
impl UnwindSafe for Nack
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