pub struct CaptureName(/* private fields */);Expand description
The name of a template capture — an identifier by construction.
§4.1 allows Unicode identifiers and the workspace has one character class
for them, praxis_syntax::ident::is_ident, which is the predicate here. A
private ASCII copy of the rule would leave {λ:int} unrecognized as a
named capture, silently reinterpreting the whole body λ:int as the
parser expression: a name a consumer cannot accept must be reported, never
rewritten into a different name.
Implementations§
Source§impl CaptureName
impl CaptureName
Sourcepub fn parse(text: &str) -> Result<Self, InvalidCaptureName>
pub fn parse(text: &str) -> Result<Self, InvalidCaptureName>
Trait Implementations§
Source§impl Clone for CaptureName
impl Clone for CaptureName
Source§fn clone(&self) -> CaptureName
fn clone(&self) -> CaptureName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CaptureName
impl Debug for CaptureName
Source§impl Display for CaptureName
impl Display for CaptureName
impl Eq for CaptureName
Source§impl Hash for CaptureName
impl Hash for CaptureName
Source§impl Ord for CaptureName
impl Ord for CaptureName
Source§fn cmp(&self, other: &CaptureName) -> Ordering
fn cmp(&self, other: &CaptureName) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CaptureName
impl PartialEq for CaptureName
Source§impl PartialOrd for CaptureName
impl PartialOrd for CaptureName
impl StructuralPartialEq for CaptureName
Auto Trait Implementations§
impl Freeze for CaptureName
impl RefUnwindSafe for CaptureName
impl Send for CaptureName
impl Sync for CaptureName
impl Unpin for CaptureName
impl UnsafeUnpin for CaptureName
impl UnwindSafe for CaptureName
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