Struct conjure_error::serializable_error::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for the SerializableError type.
Implementations§
source§impl 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 Selfwhere
T: Into<String>,
pub fn error_name<T>(&mut self, error_name: T) -> &mut Selfwhere
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 Selfwhere
T: IntoIterator<Item = (String, String)>,
pub fn parameters<T>(&mut self, parameters: T) -> &mut Selfwhere
T: IntoIterator<Item = (String, String)>,
Parameters providing more information about the error.
sourcepub fn extend_parameters<T>(&mut self, parameters: T) -> &mut Selfwhere
T: IntoIterator<Item = (String, String)>,
pub fn extend_parameters<T>(&mut self, parameters: T) -> &mut Selfwhere
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 Selfwhere
K: Into<String>,
V: Into<String>,
pub fn insert_parameters<K, V>(&mut self, key: K, value: V) -> &mut Selfwhere
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§
source§impl From<SerializableError> for Builder
impl From<SerializableError> for Builder
source§fn from(_v: SerializableError) -> Builder
fn from(_v: SerializableError) -> Builder
Converts to this type from the input type.