Struct ThreadName
pub struct ThreadName(/* private fields */);Expand description
A non-empty thread name value.
Implementations§
§impl ThreadName
impl ThreadName
pub fn new(value: impl AsRef<str>) -> Result<ThreadName, ThreadNameError>
pub fn new(value: impl AsRef<str>) -> Result<ThreadName, ThreadNameError>
Creates a thread name from non-empty text.
§Errors
Returns ThreadNameError::Empty when the trimmed input is empty.
pub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the thread name and returns the owned string.
Trait Implementations§
§impl AsRef<str> for ThreadName
impl AsRef<str> for ThreadName
§impl Clone for ThreadName
impl Clone for ThreadName
§fn clone(&self) -> ThreadName
fn clone(&self) -> ThreadName
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 more§impl Debug for ThreadName
impl Debug for ThreadName
§impl Display for ThreadName
impl Display for ThreadName
§impl FromStr for ThreadName
impl FromStr for ThreadName
§type Err = ThreadNameError
type Err = ThreadNameError
The associated error which can be returned from parsing.
§fn from_str(value: &str) -> Result<ThreadName, <ThreadName as FromStr>::Err>
fn from_str(value: &str) -> Result<ThreadName, <ThreadName as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for ThreadName
impl Hash for ThreadName
§impl Ord for ThreadName
impl Ord for ThreadName
§impl PartialEq for ThreadName
impl PartialEq for ThreadName
§impl PartialOrd for ThreadName
impl PartialOrd for ThreadName
impl Eq for ThreadName
impl StructuralPartialEq for ThreadName
Auto Trait Implementations§
impl Freeze for ThreadName
impl RefUnwindSafe for ThreadName
impl Send for ThreadName
impl Sync for ThreadName
impl Unpin for ThreadName
impl UnsafeUnpin for ThreadName
impl UnwindSafe for ThreadName
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