Enum sawp_tftp::OpCode [−][src]
#[repr(u16)] pub enum OpCode { ReadRequest, WriteRequest, Data, Acknowledgement, Error, }
The TFTP header of a packet contains the opcode associated with that packet. TFTP supports five types of packets
Variants
Trait Implementations
impl TryFrom<u16> for OpCode
[src]
impl TryFrom<u16> for OpCode
[src]type Error = TryFromPrimitiveError<Self>
type Error = TryFromPrimitiveError<Self>
The type returned in the event of a conversion error.
fn try_from(number: u16) -> Result<Self, TryFromPrimitiveError<Self>>
[src]
fn try_from(number: u16) -> Result<Self, TryFromPrimitiveError<Self>>
[src]Performs the conversion.
impl TryFromPrimitive for OpCode
[src]
impl TryFromPrimitive for OpCode
[src]type Primitive = u16
const NAME: &'static str
[src]
fn try_from_primitive(
number: Self::Primitive
) -> Result<Self, TryFromPrimitiveError<Self>>
[src]
number: Self::Primitive
) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for OpCode
[src]
impl StructuralPartialEq for OpCode
[src]
Auto Trait Implementations
impl RefUnwindSafe for OpCode
impl Send for OpCode
impl Sync for OpCode
impl Unpin for OpCode
impl UnwindSafe for OpCode
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more