Payload

Enum Payload 

Source
pub enum Payload {
Show 27 variants Init(Init), Version(Version), Open(Open), Close(Close), Read(Read), Write(Write), Lstat(Lstat), Fstat(Fstat), SetStat(SetStat), FSetStat(FSetStat), OpenDir(OpenDir), ReadDir(ReadDir), Remove(Remove), MkDir(MkDir), RmDir(RmDir), RealPath(RealPath), Stat(Stat), Rename(Rename), ReadLink(ReadLink), Symlink(Symlink), Status(Status), Handle(Handle), Data(Data), Name(Name), Attrs(Attrs), Extended(Request), ExtendedReply(Response),
}

Variants§

§

Init(Init)

§

Version(Version)

§

Open(Open)

§

Close(Close)

§

Read(Read)

§

Write(Write)

§

Lstat(Lstat)

§

Fstat(Fstat)

§

SetStat(SetStat)

§

FSetStat(FSetStat)

§

OpenDir(OpenDir)

§

ReadDir(ReadDir)

§

Remove(Remove)

§

MkDir(MkDir)

§

RmDir(RmDir)

§

RealPath(RealPath)

§

Stat(Stat)

§

Rename(Rename)

§

Status(Status)

§

Handle(Handle)

§

Data(Data)

§

Name(Name)

§

Attrs(Attrs)

§

Extended(Request)

§

ExtendedReply(Response)

Implementations§

Source§

impl<'nom> Payload

Source

pub fn parse_be( orig_i: &'nom [u8], selector: PacketType, ) -> IResult<&'nom [u8], Self>

Source

pub fn parse_le( orig_i: &'nom [u8], selector: PacketType, ) -> IResult<&'nom [u8], Self>

Source

pub fn parse( orig_i: &'nom [u8], selector: PacketType, ) -> IResult<&'nom [u8], Self>

Source§

impl Payload

Source

pub fn init(version: u32, extension_data: Vec<u8>) -> Self

Source

pub fn version(version: u32, extension_data: Vec<u8>) -> Self

Source

pub fn real_path(id: u32, path: impl AsRef<Utf8Path>) -> Self

Source

pub fn status(id: u32, status: StatusType, message: impl AsRef<str>) -> Self

Source

pub fn handle(id: u32) -> Handle

Source

pub fn name(id: u32) -> Name

Source

pub fn attrs(id: u32) -> Attrs

Source

pub fn data_with_size(id: u32, size: u32) -> Data

Source

pub fn into_packet(self) -> Packet

Trait Implementations§

Source§

impl Debug for Payload

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Attrs> for Payload

Source§

fn from(p: Attrs) -> Self

Converts to this type from the input type.
Source§

impl From<Close> for Payload

Source§

fn from(p: Close) -> Self

Converts to this type from the input type.
Source§

impl From<Data> for Payload

Source§

fn from(p: Data) -> Self

Converts to this type from the input type.
Source§

impl From<FSetStat> for Payload

Source§

fn from(p: FSetStat) -> Self

Converts to this type from the input type.
Source§

impl From<Fstat> for Payload

Source§

fn from(p: Fstat) -> Self

Converts to this type from the input type.
Source§

impl From<Handle> for Payload

Source§

fn from(p: Handle) -> Self

Converts to this type from the input type.
Source§

impl From<Init> for Payload

Source§

fn from(p: Init) -> Self

Converts to this type from the input type.
Source§

impl From<Lstat> for Payload

Source§

fn from(p: Lstat) -> Self

Converts to this type from the input type.
Source§

impl From<MkDir> for Payload

Source§

fn from(p: MkDir) -> Self

Converts to this type from the input type.
Source§

impl From<Name> for Payload

Source§

fn from(p: Name) -> Self

Converts to this type from the input type.
Source§

impl From<Open> for Payload

Source§

fn from(p: Open) -> Self

Converts to this type from the input type.
Source§

impl From<OpenDir> for Payload

Source§

fn from(p: OpenDir) -> Self

Converts to this type from the input type.
Source§

impl From<Read> for Payload

Source§

fn from(p: Read) -> Self

Converts to this type from the input type.
Source§

impl From<ReadDir> for Payload

Source§

fn from(p: ReadDir) -> Self

Converts to this type from the input type.
Source§

impl From<ReadLink> for Payload

Source§

fn from(p: ReadLink) -> Self

Converts to this type from the input type.
Source§

impl From<RealPath> for Payload

Source§

fn from(p: RealPath) -> Self

Converts to this type from the input type.
Source§

impl From<Remove> for Payload

Source§

fn from(p: Remove) -> Self

Converts to this type from the input type.
Source§

impl From<Rename> for Payload

Source§

fn from(p: Rename) -> Self

Converts to this type from the input type.
Source§

impl From<Request> for Payload

Source§

fn from(p: Request) -> Self

Converts to this type from the input type.
Source§

impl From<Response> for Payload

Source§

fn from(p: Response) -> Self

Converts to this type from the input type.
Source§

impl From<RmDir> for Payload

Source§

fn from(p: RmDir) -> Self

Converts to this type from the input type.
Source§

impl From<SetStat> for Payload

Source§

fn from(p: SetStat) -> Self

Converts to this type from the input type.
Source§

impl From<Stat> for Payload

Source§

fn from(p: Stat) -> Self

Converts to this type from the input type.
Source§

impl From<Status> for Payload

Source§

fn from(p: Status) -> Self

Converts to this type from the input type.
Source§

impl From<Symlink> for Payload

Source§

fn from(p: Symlink) -> Self

Converts to this type from the input type.
Source§

impl From<Version> for Payload

Source§

fn from(p: Version) -> Self

Converts to this type from the input type.
Source§

impl From<Write> for Payload

Source§

fn from(p: Write) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Payload

Source§

fn eq(&self, other: &Payload) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Payload

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for Payload

Source§

impl StructuralPartialEq for Payload

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V