#[non_exhaustive]pub struct StringError {
pub kind: StringErrorKind,
}Expand description
Error returned by string read/write operations.
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.kind: StringErrorKindWhat specifically went wrong.
Implementations§
Source§impl StringError
impl StringError
Sourcepub const fn new(kind: StringErrorKind) -> Self
pub const fn new(kind: StringErrorKind) -> Self
Construct a StringError from its kind.
Trait Implementations§
Source§impl Debug for StringError
impl Debug for StringError
Source§impl Display for StringError
impl Display for StringError
Source§impl Error for StringError
impl Error for StringError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<PrimitiveError> for StringError
impl From<PrimitiveError> for StringError
Source§fn from(err: PrimitiveError) -> Self
fn from(err: PrimitiveError) -> Self
Converts to this type from the input type.
Source§impl From<StringError> for ProtocolError
impl From<StringError> for ProtocolError
Source§fn from(source: StringError) -> Self
fn from(source: StringError) -> Self
Converts to this type from the input type.
Source§impl From<StringErrorKind> for StringError
impl From<StringErrorKind> for StringError
Source§fn from(kind: StringErrorKind) -> Self
fn from(kind: StringErrorKind) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StringError
impl RefUnwindSafe for StringError
impl Send for StringError
impl Sync for StringError
impl Unpin for StringError
impl UnsafeUnpin for StringError
impl UnwindSafe for StringError
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