pub struct CommandErrorBuilder { /* private fields */ }
Expand description
Builder for CommandError
.
Implementations§
Source§impl CommandErrorBuilder
impl CommandErrorBuilder
pub fn with_reason<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn with_error_data<VALUE: Into<HashMap<String, Value>>>( &mut self, value: VALUE, ) -> &mut Self
pub fn with_errors<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Sourcepub fn build(&self) -> Result<CommandError, CommandErrorBuilderError>
pub fn build(&self) -> Result<CommandError, CommandErrorBuilderError>
Source§impl CommandErrorBuilder
impl CommandErrorBuilder
pub fn with_status_message(self, description: String) -> Self
Trait Implementations§
Source§impl Clone for CommandErrorBuilder
impl Clone for CommandErrorBuilder
Source§fn clone(&self) -> CommandErrorBuilder
fn clone(&self) -> CommandErrorBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for CommandErrorBuilder
impl RefUnwindSafe for CommandErrorBuilder
impl Send for CommandErrorBuilder
impl Sync for CommandErrorBuilder
impl Unpin for CommandErrorBuilder
impl UnwindSafe for CommandErrorBuilder
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