#[non_exhaustive]pub struct ParseDerivationStyleError { /* private fields */ }Expand description
Error returned when FromStr fails on a chain’s DerivationStyle.
Carries the chain name, the rejected input, and the full accepted
token list (aliases included). The Display impl produces a single
actionable diagnostic so CLI error output needs no further massaging.
Implementations§
Source§impl ParseDerivationStyleError
impl ParseDerivationStyleError
Sourcepub fn new(
chain: &'static str,
input: impl Into<String>,
accepted: &'static [&'static str],
) -> Self
pub fn new( chain: &'static str, input: impl Into<String>, accepted: &'static [&'static str], ) -> Self
Construct a new error.
chain is typically a short lowercase identifier ("ethereum",
"solana", "ton"); accepted must list every alias the chain’s
FromStr implementation recognises, in the order they should
appear in the human-readable message.
Trait Implementations§
Source§impl Clone for ParseDerivationStyleError
impl Clone for ParseDerivationStyleError
Source§fn clone(&self) -> ParseDerivationStyleError
fn clone(&self) -> ParseDerivationStyleError
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 ParseDerivationStyleError
impl Debug for ParseDerivationStyleError
Source§impl Display for ParseDerivationStyleError
impl Display for ParseDerivationStyleError
Source§impl Error for ParseDerivationStyleError
Available on crate feature std only.
impl Error for ParseDerivationStyleError
Available on crate feature
std only.1.30.0 · 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()
impl Eq for ParseDerivationStyleError
impl StructuralPartialEq for ParseDerivationStyleError
Auto Trait Implementations§
impl Freeze for ParseDerivationStyleError
impl RefUnwindSafe for ParseDerivationStyleError
impl Send for ParseDerivationStyleError
impl Sync for ParseDerivationStyleError
impl Unpin for ParseDerivationStyleError
impl UnsafeUnpin for ParseDerivationStyleError
impl UnwindSafe for ParseDerivationStyleError
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