pub struct Text(/* private fields */);Expand description
The text of one line of output
The value holds the line without the characters that ended it. A
command writes bytes, and a byte that is part of no valid character
becomes the replacement character U+FFFD, so the text is always
valid UTF-8. A caller that needs the bytes as the command wrote them
reads them from the capture of the result.
Implementations§
Source§impl Text
impl Text
Sourcepub fn new(name: impl Into<String>) -> Text
pub fn new(name: impl Into<String>) -> Text
Creates a new Text
This method creates a new Text from anything that implements the Into<String> trait. This includes &str, String, and other types that can be converted into a String.
§Example
use typed_fields::name;
name!(Name);
let name = Name::new("name");Trait Implementations§
impl Eq for Text
Source§impl Ord for Text
impl Ord for Text
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Text
impl PartialOrd for Text
impl StructuralPartialEq for Text
Auto Trait Implementations§
impl Freeze for Text
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnsafeUnpin for Text
impl UnwindSafe for Text
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