#[non_exhaustive]pub struct ConnectionError {
pub error_domain: String,
pub error_message: String,
/* private fields */
}Expand description
Information around the error that occurred if the connection state is anything other than available or unspecified
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.error_domain: StringThe error domain for the error
error_message: StringThe error message for the error
Implementations§
Source§impl ConnectionError
impl ConnectionError
pub fn new() -> Self
Sourcepub fn set_error_domain<T: Into<String>>(self, v: T) -> Self
pub fn set_error_domain<T: Into<String>>(self, v: T) -> Self
Sets the value of error_domain.
§Example
ⓘ
let x = ConnectionError::new().set_error_domain("example");Sourcepub fn set_error_message<T: Into<String>>(self, v: T) -> Self
pub fn set_error_message<T: Into<String>>(self, v: T) -> Self
Sets the value of error_message.
§Example
ⓘ
let x = ConnectionError::new().set_error_message("example");Trait Implementations§
Source§impl Clone for ConnectionError
impl Clone for ConnectionError
Source§fn clone(&self) -> ConnectionError
fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConnectionError
impl Debug for ConnectionError
Source§impl Default for ConnectionError
impl Default for ConnectionError
Source§fn default() -> ConnectionError
fn default() -> ConnectionError
Returns the “default value” for a type. Read more
Source§impl Message for ConnectionError
impl Message for ConnectionError
Source§impl PartialEq for ConnectionError
impl PartialEq for ConnectionError
impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
impl Freeze for ConnectionError
impl RefUnwindSafe for ConnectionError
impl Send for ConnectionError
impl Sync for ConnectionError
impl Unpin for ConnectionError
impl UnwindSafe for ConnectionError
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