pub struct Filename(pub String);
Expand description

A filename as found in a RRQ or WRQ packet.

In TFTP, filenames are byte strings, transferred as NetASCII. There is no implicit or explicit encoding, like UTF-8, but this library makes a choice to parse and encode with UTF-8. This will be correct for 7-bit ASCII, which likely reflects the intentions of TFTP’s creators, but may cause some incompatibility in real-world use, hence this choice may be revisited.

NetASCII is an anachronistic fly in the ointment that this library does not yet even attempt to support.

Tuple Fields

0: String

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.