pub struct TextString<'a>(pub &'a [u8]);Expand description
A text string that may be presented to a user or used for things such as a password, username, exec command, TCP hostname, etc.
The SSH protocol defines it to be UTF-8, though
in some applications it could be treated as ASCII-only.
Sunset treats it as an opaque &[u8], leaving
interpretation to the application.
Note that SSH protocol identifiers in Packet
are &str rather than TextString, and always defined as ASCII. For
example "publickey", "ssh-ed25519".
Application API
Tuple Fields§
§0: &'a [u8]Implementations§
Trait Implementations§
Source§impl<'a> AsRef<[u8]> for TextString<'a>
impl<'a> AsRef<[u8]> for TextString<'a>
Source§impl<'a> Clone for TextString<'a>
impl<'a> Clone for TextString<'a>
Source§fn clone(&self) -> TextString<'a>
fn clone(&self) -> TextString<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextString<'_>
impl Debug for TextString<'_>
Source§impl Display for TextString<'_>
impl Display for TextString<'_>
Source§impl<'a> From<&'a str> for TextString<'a>
impl<'a> From<&'a str> for TextString<'a>
Source§impl<'a> Hash for TextString<'a>
impl<'a> Hash for TextString<'a>
Source§impl<'a> Ord for TextString<'a>
impl<'a> Ord for TextString<'a>
Source§fn cmp(&self, other: &TextString<'a>) -> Ordering
fn cmp(&self, other: &TextString<'a>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialEq for TextString<'a>
impl<'a> PartialEq for TextString<'a>
Source§impl<'a> PartialOrd for TextString<'a>
impl<'a> PartialOrd for TextString<'a>
Source§impl<'de> SSHDecode<'de> for TextString<'de>
impl<'de> SSHDecode<'de> for TextString<'de>
Source§impl SSHEncode for TextString<'_>
impl SSHEncode for TextString<'_>
impl<'a> Copy for TextString<'a>
impl<'a> Eq for TextString<'a>
impl<'a> StructuralPartialEq for TextString<'a>
Auto Trait Implementations§
impl<'a> Freeze for TextString<'a>
impl<'a> RefUnwindSafe for TextString<'a>
impl<'a> Send for TextString<'a>
impl<'a> Sync for TextString<'a>
impl<'a> Unpin for TextString<'a>
impl<'a> UnwindSafe for TextString<'a>
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