pub struct Upper<P>(/* private fields */);Expand description
A case adapter for a character profile that accepts uncased, uppercase, and titlecase characters.
Trait Implementations§
impl<P: CharProfile> CasedProfile for Upper<P>
Source§impl<P: CharProfile> Profile for Upper<P>
impl<P: CharProfile> Profile for Upper<P>
Source§const APPEND_CLOSED: AppendClosed = P::APPEND_CLOSED
const APPEND_CLOSED: AppendClosed = P::APPEND_CLOSED
Whether or not a fragment containing characters in this profile are
append-closed. Read more
Source§type BaseProfile = P
type BaseProfile = P
The underlying profile that this profile is based on. Read more
Source§type Segmentation = <P as Profile>::Segmentation
type Segmentation = <P as Profile>::Segmentation
The segmentation strategy that this profile uses. Read more
Source§fn is_ident_start(c: char) -> bool
fn is_ident_start(c: char) -> bool
Whether or not the provided character can appear at the absolute start
of an identifier. Read more
Source§fn is_chunk_start(c: char) -> bool
fn is_chunk_start(c: char) -> bool
Whether or not the provided character can appear at the start of a new
chunk (e.g. right after a delimiter). Read more
Source§fn in_profile(c: char) -> bool
fn in_profile(c: char) -> bool
Whether or not the provided character can appear at any point in a
chunk. Read more
Source§fn is_chunk_continue(c: char) -> bool
fn is_chunk_continue(c: char) -> bool
Whether or not the provided character is valid at any position after the
first character of a chunk (a run of non-delimiter characters).
impl<Superset, Subset> SubsetOf<Superset> for Upper<Subset>
Proof: If Super ⊆ Subset, then Super ⊆ Upper<Subset>.
Let’s pretend that Superset=Unicode, and Subset=Ascii.
If Ascii: SubsetOf<Unicode> (true), then this implies the following:
Upper<Ascii>: SubsetOf<Unicode>
§Examples
left_is_subset_of_right::<Upper<Ascii>, Ascii>();
left_is_subset_of_right::<Upper<Unicode>, Unicode>();
left_is_subset_of_right::<Upper<Ascii>, Unicode>();impl<Superset, Subset> SubsetOf<Upper<Superset>> for Upper<Subset>
Proof: if Super ⊆ Subset, then Upper<Super> ⊆ Upper<Subset>.
Let’s pretend that Superset=Unicode, and Subset=Ascii.
If Ascii: SubsetOf<Unicode> (true), then this implies the following:
Upper<Ascii>: SubsetOf<Upper<Unicode>>
§Examples
left_is_subset_of_right::<Upper<Ascii>, Upper<Ascii>>();
left_is_subset_of_right::<Upper<Unicode>, Upper<Unicode>>();
left_is_subset_of_right::<Upper<Ascii>, Upper<Unicode>>();impl<Superset, Subset> SubsetOf<UpperCamel<Superset>> for Upper<Subset>
Proof: If Super ⊆ Subset, then UpperCamel<Super> ⊆ Upper<Subset>
(because UpperCamel ⊆ Upper).
Let’s pretend that Superset=Unicode, and Subset=Ascii.
If Ascii: SubsetOf<Unicode> (true), then this implies the following:
Upper<Ascii>: SubsetOf<UpperCamel<Unicode>>
§Examples
left_is_subset_of_right::<Upper<Ascii>, UpperCamel<Ascii>>();
left_is_subset_of_right::<Upper<Unicode>, UpperCamel<Unicode>>();
left_is_subset_of_right::<Upper<Ascii>, UpperCamel<Unicode>>();Auto Trait Implementations§
impl<P> Freeze for Upper<P>where
PhantomData<P>: Freeze,
impl<P> RefUnwindSafe for Upper<P>where
PhantomData<P>: RefUnwindSafe,
impl<P> Send for Upper<P>where
PhantomData<P>: Send,
impl<P> Sync for Upper<P>where
PhantomData<P>: Sync,
impl<P> Unpin for Upper<P>where
PhantomData<P>: Unpin,
impl<P> UnsafeUnpin for Upper<P>where
PhantomData<P>: UnsafeUnpin,
impl<P> UnwindSafe for Upper<P>where
PhantomData<P>: UnwindSafe,
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