pub struct Builder<T>(/* private fields */);
Expand description
A builder for SerializableError
Implementations§
Source§impl Builder<ErrorInstanceIdStage>
impl Builder<ErrorInstanceIdStage>
Sourcepub fn error_instance_id(
self,
error_instance_id: impl Into<String>,
) -> Builder<StatusCodeStage>
pub fn error_instance_id( self, error_instance_id: impl Into<String>, ) -> Builder<StatusCodeStage>
Sets the error_instance_id
field.
Source§impl Builder<StatusCodeStage>
impl Builder<StatusCodeStage>
Sourcepub fn status_code(self, status_code: i32) -> Builder<Complete>
pub fn status_code(self, status_code: i32) -> Builder<Complete>
Sets the status_code
field.
Source§impl Builder<Complete>
impl Builder<Complete>
Sourcepub fn error_instance_id(self, error_instance_id: impl Into<String>) -> Self
pub fn error_instance_id(self, error_instance_id: impl Into<String>) -> Self
Sets the error_instance_id
field.
Sourcepub fn status_code(self, status_code: i32) -> Self
pub fn status_code(self, status_code: i32) -> Self
Sets the status_code
field.
Sourcepub fn build(self) -> SerializableError
pub fn build(self) -> SerializableError
Consumes the builder, returning a SerializableError
.
Trait Implementations§
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