pub struct ParseIdError { /* private fields */ }Expand description
An opaque identifier was not written in Tollgate’s canonical textual form.
The wire form is a fixed number of lowercase hexadecimal digits, without a
0x prefix. Keeping the parser strict gives display output, paths, and JSON
one representation rather than a collection of equivalent spellings.
The expected width travels with the error because Tollgate has identifiers
of two widths — 32 digits for the 128-bit types, 64 for
PolicyRevision — and one rule serving both must be able to say which it
was applying. A single error type stating the width is one rule; a second
error type beside a second parser would be two rules that have to agree.
Implementations§
Source§impl ParseIdError
impl ParseIdError
Sourcepub const fn expected_digits(self) -> usize
pub const fn expected_digits(self) -> usize
How many lowercase hexadecimal digits the canonical form has.
Trait Implementations§
Source§impl Clone for ParseIdError
impl Clone for ParseIdError
impl Copy for ParseIdError
Source§impl Debug for ParseIdError
impl Debug for ParseIdError
Source§impl Display for ParseIdError
impl Display for ParseIdError
impl Eq for ParseIdError
Source§impl Error for ParseIdError
impl Error for ParseIdError
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()
Source§impl PartialEq for ParseIdError
impl PartialEq for ParseIdError
impl StructuralPartialEq for ParseIdError
Auto Trait Implementations§
impl Freeze for ParseIdError
impl RefUnwindSafe for ParseIdError
impl Send for ParseIdError
impl Sync for ParseIdError
impl Unpin for ParseIdError
impl UnsafeUnpin for ParseIdError
impl UnwindSafe for ParseIdError
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