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
Fixed
No
None
Implementations
sourceimpl 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
sourceimpl Ord for Encoding
impl Ord for Encoding
sourceimpl PartialOrd<Encoding> for Encoding
impl PartialOrd<Encoding> for Encoding
sourcefn partial_cmp(&self, other: &Encoding) -> Option<Ordering>
fn partial_cmp(&self, other: &Encoding) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl TryConvertMut<Value, Encoding> for Artichoke
impl TryConvertMut<Value, Encoding> for Artichoke
type Error = InvalidEncodingError
type Error = InvalidEncodingError
Error type for failed conversions.
impl Copy for Encoding
impl Eq for Encoding
Auto Trait Implementations
impl RefUnwindSafe for Encoding
impl Send for Encoding
impl Sync for Encoding
impl Unpin for Encoding
impl UnwindSafe for Encoding
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more