Struct regex_syntax::hir::Literal
source · 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§
source§impl PartialEq for Literal
impl PartialEq for Literal
impl Eq for Literal
impl StructuralEq for Literal
impl StructuralPartialEq for Literal
Auto Trait Implementations§
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