Skip to main content

TransferredPacket

Struct TransferredPacket 

Source
pub struct TransferredPacket<T: PacketPerms>(/* private fields */);
Expand description

Represents the state of the packet that has already had data transferred to.

This struct is marked as must_use, because the intention is for the backend to be explicit about when the packet is dropped and released to the user. Since bound packets may call a function that generates more I/O requests, it is important to drop the packet outside critical sections.

Trait Implementations§

Source§

impl<T: PacketPerms> Errorable for TransferredPacket<T>

Source§

fn error(self, err: Error)

Source§

impl<Perms: PacketPerms> From<TransferredPacket<Perms>> for StandardPktVariations<Perms>

Source§

fn from(p: TransferredPacket<Perms>) -> Self

Converts to this type from the input type.
Source§

impl From<TransferredPacket<Read>> for AnyPacket

Source§

fn from(p: TransferredPacket<Read>) -> Self

Converts to this type from the input type.
Source§

impl From<TransferredPacket<ReadWrite>> for AnyPacket

Source§

fn from(p: TransferredPacket<ReadWrite>) -> Self

Converts to this type from the input type.
Source§

impl From<TransferredPacket<Write>> for AnyPacket

Source§

fn from(p: TransferredPacket<Write>) -> Self

Converts to this type from the input type.
Source§

impl<T: PacketPerms> Splittable<u64> for TransferredPacket<T>

Source§

fn split_at(self, len: u64) -> (Self, Self)

Splits an object at given position. Read more
Source§

fn len(&self) -> u64

Source§

fn is_empty(&self) -> bool

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, F> From2<T> for F
where T: Into<F>,

Source§

fn from2(other: T) -> F

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> GenericTypeBounds for T

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.