Struct conjure_error::serializable_error::Builder
source · [−]pub struct Builder { /* private fields */ }Expand description
A builder for the SerializableError type.
Implementations
sourceimpl Builder
impl Builder
sourcepub fn error_code(&mut self, error_code: ErrorCode) -> &mut Self
pub fn error_code(&mut self, error_code: ErrorCode) -> &mut Self
The broad category of the error.
When transmitted over HTTP, this determines the response’s status code.
Required.
sourcepub fn error_name<T>(&mut self, error_name: T) -> &mut Self where
T: Into<String>,
pub fn error_name<T>(&mut self, error_name: T) -> &mut Self where
T: Into<String>,
The error’s name.
The name is made up of a namespace and more specific error name, separated by a :.
Required.
sourcepub fn error_instance_id(&mut self, error_instance_id: Uuid) -> &mut Self
pub fn error_instance_id(&mut self, error_instance_id: Uuid) -> &mut Self
A unique identifier for this error instance.
This can be used to correlate reporting about the error as it transfers between components of a distributed system.
Required.
sourcepub fn parameters<T>(&mut self, parameters: T) -> &mut Self where
T: IntoIterator<Item = (String, String)>,
pub fn parameters<T>(&mut self, parameters: T) -> &mut Self where
T: IntoIterator<Item = (String, String)>,
Parameters providing more information about the error.
sourcepub fn extend_parameters<T>(&mut self, parameters: T) -> &mut Self where
T: IntoIterator<Item = (String, String)>,
pub fn extend_parameters<T>(&mut self, parameters: T) -> &mut Self where
T: IntoIterator<Item = (String, String)>,
Parameters providing more information about the error.
sourcepub fn insert_parameters<K, V>(&mut self, key: K, value: V) -> &mut Self where
K: Into<String>,
V: Into<String>,
pub fn insert_parameters<K, V>(&mut self, key: K, value: V) -> &mut Self where
K: Into<String>,
V: Into<String>,
Parameters providing more information about the error.
sourcepub fn build(&self) -> SerializableError
pub fn build(&self) -> SerializableError
Trait Implementations
sourceimpl From<SerializableError> for Builder
impl From<SerializableError> for Builder
sourcefn from(_v: SerializableError) -> Builder
fn from(_v: SerializableError) -> Builder
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more