pub struct ThinStatusBuilder<'a> { /* private fields */ }Expand description
Allows convenient construction of ThinStatus instances.
Implementations§
Source§impl<'a> ThinStatusBuilder<'a>
impl<'a> ThinStatusBuilder<'a>
Sourcepub fn new<C: Into<NonZeroI32>>(code: C) -> Self
pub fn new<C: Into<NonZeroI32>>(code: C) -> Self
Constructs a builder from an error code (which can be, and often is ErrorCode).
Sourcepub fn code<C: Into<NonZeroI32>>(self, code: C) -> Self
pub fn code<C: Into<NonZeroI32>>(self, code: C) -> Self
Sets the error code to code.
Sourcepub fn message(self, message: &'a str) -> Self
pub fn message(self, message: &'a str) -> Self
Sets the message to message, discarding any previous one. The builder captures only a
reference to it to avoid copying.
pub fn build(self) -> ThinStatus
Trait Implementations§
Source§impl From<ThinStatusBuilder<'_>> for ThinStatus
impl From<ThinStatusBuilder<'_>> for ThinStatus
Source§fn from(builder: ThinStatusBuilder<'_>) -> Self
fn from(builder: ThinStatusBuilder<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> Write for ThinStatusBuilder<'a>
Allows convenient appending to the text message. If it contains just a reference passed to
message, the reference is copied into a new String that can be appended to.
impl<'a> Write for ThinStatusBuilder<'a>
Allows convenient appending to the text message. If it contains just a reference passed to
message, the reference is copied into a new String that can be appended to.
Auto Trait Implementations§
impl<'a> Freeze for ThinStatusBuilder<'a>
impl<'a> RefUnwindSafe for ThinStatusBuilder<'a>
impl<'a> Send for ThinStatusBuilder<'a>
impl<'a> Sync for ThinStatusBuilder<'a>
impl<'a> Unpin for ThinStatusBuilder<'a>
impl<'a> UnsafeUnpin for ThinStatusBuilder<'a>
impl<'a> UnwindSafe for ThinStatusBuilder<'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