pub struct Builder<T>(/* private fields */);
Expand description
A builder for SerializableError
Implementations§
Source§impl Builder<ErrorCodeStage>
impl Builder<ErrorCodeStage>
Sourcepub fn error_code(self, error_code: ErrorCode) -> Builder<ErrorNameStage>
pub fn error_code(self, error_code: ErrorCode) -> Builder<ErrorNameStage>
Sets the error_code
field.
Source§impl Builder<ErrorNameStage>
impl Builder<ErrorNameStage>
Sourcepub fn error_name(
self,
error_name: impl Into<String>,
) -> Builder<ErrorInstanceIdStage>
pub fn error_name( self, error_name: impl Into<String>, ) -> Builder<ErrorInstanceIdStage>
Sets the error_name
field.
Source§impl Builder<ErrorInstanceIdStage>
impl Builder<ErrorInstanceIdStage>
Sourcepub fn error_instance_id(self, error_instance_id: Uuid) -> Builder<Complete>
pub fn error_instance_id(self, error_instance_id: Uuid) -> Builder<Complete>
Sets the error_instance_id
field.
Source§impl Builder<Complete>
impl Builder<Complete>
Sourcepub fn error_code(self, error_code: ErrorCode) -> Self
pub fn error_code(self, error_code: ErrorCode) -> Self
Sets the error_code
field.
Sourcepub fn error_name(self, error_name: impl Into<String>) -> Self
pub fn error_name(self, error_name: impl Into<String>) -> Self
Sets the error_name
field.
Sourcepub fn error_instance_id(self, error_instance_id: Uuid) -> Self
pub fn error_instance_id(self, error_instance_id: Uuid) -> Self
Sets the error_instance_id
field.
Sourcepub fn insert_parameters(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn insert_parameters( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Adds an entry to the parameters
field.
Sourcepub fn parameters(
self,
parameters: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>,
) -> Self
pub fn parameters( self, parameters: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>, ) -> Self
Sets the parameters
field.
Sourcepub fn extend_parameters(
self,
parameters: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>,
) -> Self
pub fn extend_parameters( self, parameters: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>, ) -> Self
Adds entries to the parameters
field.
Sourcepub fn build(self) -> SerializableError
pub fn build(self) -> SerializableError
Consumes the builder, returning a SerializableError
.
Trait Implementations§
Source§impl Default for Builder<ErrorCodeStage>
impl Default for Builder<ErrorCodeStage>
Source§impl From<SerializableError> for Builder<Complete>
impl From<SerializableError> for Builder<Complete>
Source§fn from(v: SerializableError) -> Self
fn from(v: SerializableError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> Freeze for Builder<T>where
T: Freeze,
impl<T> RefUnwindSafe for Builder<T>where
T: RefUnwindSafe,
impl<T> Send for Builder<T>where
T: Send,
impl<T> Sync for Builder<T>where
T: Sync,
impl<T> Unpin for Builder<T>where
T: Unpin,
impl<T> UnwindSafe for Builder<T>where
T: UnwindSafe,
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