pub struct Literal(pub Box<[u8]>);
Expand description
The high-level intermediate representation of a literal.
A literal corresponds to 0
or more bytes that should be matched
literally. The smart constructors defined on Hir
will automatically
concatenate adjacent literals into one literal, and will even automatically
replace empty literals with Hir::empty()
.
Note that despite a literal being represented by a sequence of bytes, its
Debug
implementation will attempt to print it as a normal string. (That
is, not a sequence of decimal numbers.)
Tuple Fields§
§0: Box<[u8]>
Trait Implementations§
impl Eq for Literal
impl StructuralPartialEq for Literal
Auto Trait Implementations§
impl Freeze for Literal
impl RefUnwindSafe for Literal
impl Send for Literal
impl Sync for Literal
impl Unpin for Literal
impl UnwindSafe for Literal
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)