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: StringImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Filename
impl RefUnwindSafe for Filename
impl Send for Filename
impl Sync for Filename
impl Unpin for Filename
impl UnwindSafe for Filename
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