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
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)
clone_to_uninit
)Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes