pub struct TraitError {
kind: TraitErrorKind,
}Expand description
Errors produced while decoding a trait loadout string.
Fields§
§kind: TraitErrorKindImplementations§
Source§impl TraitError
impl TraitError
const fn invalid_characters() -> Self
const fn too_short() -> Self
const fn not_enough_data() -> Self
Sourcepub const fn is_invalid_characters(&self) -> bool
pub const fn is_invalid_characters(&self) -> bool
Returns whether the input contains an unsupported character.
Sourcepub const fn is_too_short(&self) -> bool
pub const fn is_too_short(&self) -> bool
Returns whether the input was empty.
Sourcepub const fn is_not_enough_data(&self) -> bool
pub const fn is_not_enough_data(&self) -> bool
Returns whether the encoded input ended in the middle of its header or a node.
Trait Implementations§
Source§impl Debug for TraitError
impl Debug for TraitError
Source§impl Display for TraitError
impl Display for TraitError
Source§impl Error for TraitError
impl Error for TraitError
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<TryFromIntError> for TraitError
impl From<TryFromIntError> for TraitError
Source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TraitError
impl RefUnwindSafe for TraitError
impl Send for TraitError
impl Sync for TraitError
impl Unpin for TraitError
impl UnsafeUnpin for TraitError
impl UnwindSafe for TraitError
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
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of [
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString]. Read more