pub enum ParseTreeError {
Checksum(Error),
MaxRecursionDepthExceeded {
actual: usize,
maximum: u32,
},
ExpectedParenOrComma {
ch: char,
pos: usize,
},
UnmatchedOpenParen {
ch: char,
pos: usize,
},
UnmatchedCloseParen {
ch: char,
pos: usize,
},
MismatchedParens {
open_ch: char,
open_pos: usize,
close_ch: char,
close_pos: usize,
},
IncorrectName {
actual: String,
expected: &'static str,
},
IncorrectNumberOfChildren {
description: &'static str,
n_children: usize,
minimum: Option<usize>,
maximum: Option<usize>,
},
IllegalCurlyBrace {
pos: usize,
},
MultipleSeparators {
separator: char,
pos: usize,
},
TrailingCharacter {
ch: char,
pos: usize,
},
UnknownName {
name: String,
},
}Expand description
An error parsing an expression tree.
Variants§
Checksum(Error)
Error validating the checksum or character set.
MaxRecursionDepthExceeded
Expression tree had depth exceeding our hard cap.
Fields
ExpectedParenOrComma
After a close-paren, the only valid next characters are close-parens and commas. Got something else.
UnmatchedOpenParen
An open-parenthesis had no corresponding close-parenthesis.
UnmatchedCloseParen
A close-parenthesis had no corresponding open-parenthesis.
MismatchedParens
A ( was matched with a } or vice-versa.
Fields
IncorrectName
A node had the wrong name.
IncorrectNumberOfChildren
A node had the wrong number of children.
Fields
IllegalCurlyBrace
A Taproot child occurred somewhere it was not allowed.
MultipleSeparators
Multiple separators (‘:’ or ‘@’) appeared in a node name.
TrailingCharacter
Data occurred after the final ).
UnknownName
A node’s name was not recognized.
Trait Implementations§
Source§impl Debug for ParseTreeError
impl Debug for ParseTreeError
Source§impl Display for ParseTreeError
impl Display for ParseTreeError
Source§impl Error for ParseTreeError
Available on crate feature std only.
impl Error for ParseTreeError
Available on crate feature
std only.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<Error> for ParseTreeError
impl From<Error> for ParseTreeError
Source§impl From<ParseTreeError> for ParseError
impl From<ParseTreeError> for ParseError
Source§fn from(e: ParseTreeError) -> Self
fn from(e: ParseTreeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ParseTreeError
impl PartialEq for ParseTreeError
impl Eq for ParseTreeError
impl StructuralPartialEq for ParseTreeError
Auto Trait Implementations§
impl Freeze for ParseTreeError
impl RefUnwindSafe for ParseTreeError
impl Send for ParseTreeError
impl Sync for ParseTreeError
impl Unpin for ParseTreeError
impl UnwindSafe for ParseTreeError
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