pub enum Encoding {
Fixed,
No,
None,
}
Expand description
The encoding of a Regexp literal.
Regexps are assumed to use the source encoding but literals may override the encoding with a Regexp modifier.
See Regexp
encoding.
Variants§
Implementations§
Source§impl Encoding
impl Encoding
Sourcepub const fn flags(self) -> Flags
pub const fn flags(self) -> Flags
Convert an Encoding
to its bit flag representation.
Alias for the corresponding Into<Flags>
implementation.
Sourcepub const fn into_bits(self) -> u8
pub const fn into_bits(self) -> u8
Convert an Encoding
to its bit representation.
Alias for the corresponding Into<u8>
implementation.
Sourcepub const fn as_modifier_str(self) -> &'static str
pub const fn as_modifier_str(self) -> &'static str
Serialize the encoding flags to a string suitable for a Regexp
display
or debug implementation.
See also Regexp#inspect
.
Trait Implementations§
Source§impl Ord for Encoding
impl Ord for Encoding
Source§impl PartialOrd for Encoding
impl PartialOrd for Encoding
impl Copy for Encoding
impl Eq for Encoding
Auto Trait Implementations§
impl Freeze for Encoding
impl RefUnwindSafe for Encoding
impl Send for Encoding
impl Sync for Encoding
impl Unpin for Encoding
impl UnwindSafe for Encoding
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