Skip to main content

Uniform

Struct Uniform 

Source
pub struct Uniform<P>(/* private fields */);
Expand description

A case adapter for a character profile that accepts either Lower or or Upper (but not a mixture of both, like Mixed would).

§Caution

Unlike many other profiles, this profile presents an interdependent casing requirement (e.g. the case of the other restricted characters impact the validity of each other).

Because of this, just plainly calling the functions of this Profile may be more permissive than actually calling the is_ident, is_fragment, or is_ident_fragment functions.

Trait Implementations§

Source§

impl<P: CharProfile> CasedProfile for Uniform<P>

Source§

fn is_chunk<D: Delimiter>(s: &str) -> Result<(), SyntaxError>

Given a UTF-8 string, check whether or not it’s a valid chunk. Read more
Source§

fn is_fragment<D: Delimiter>(s: &str) -> Result<(), SyntaxError>

Given a UTF-8 string, check whether or not it’s a valid fragment. Read more
Source§

fn is_ident<D: Delimiter>(s: &str) -> Result<(), SyntaxError>

Given a UTF-8 string, check whether or not it’s a valid identifier. Read more
Source§

fn is_ident_fragment<D: Delimiter>(fragment: &str) -> Result<(), SyntaxError>

Given a UTF-8 string that is known to pass is_fragment, check whether or not it’s a valid identifier. Read more
Source§

impl<P: CharProfile> Profile for Uniform<P>

Source§

const APPEND_CLOSED: AppendClosed = P::APPEND_CLOSED

Whether or not a fragment containing characters in this profile are append-closed. Read more
Source§

type CharProfile = P

The underlying character profile that this profile is based on. Read more
Source§

type Segmentation = <P as Profile>::Segmentation

The segmentation strategy that this profile uses. Read more
Source§

fn is_chunk_char(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

Whether or not the provided character is valid at any position after the first character of a chunk (a run of non-delimiter characters).
Source§

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 is_ident_start_char(c: char) -> bool

Whether or not the provided character can appear at the absolute start of an identifier. Read more
Source§

impl<Superset, Subset> SubsetOf<Camel<Superset>> for Uniform<Subset>
where Superset: CharProfile, Subset: CharProfile + SubsetOf<Superset>,

Proof: If Subset ⊆ Superset, then Uniform<Subset> ⊆ Camel<Superset>

Source§

impl<Superset, Subset> SubsetOf<Mixed<Superset>> for Uniform<Subset>
where Superset: CharProfile, Subset: CharProfile + SubsetOf<Superset>,

Proof: If Subset ⊆ Superset, then Uniform<Subset> ⊆ Mixed<Superset>

Source§

impl<Superset, Subset> SubsetOf<Superset> for Uniform<Subset>
where Superset: CharProfile, Subset: CharProfile + SubsetOf<Superset>,

Proof: If Subset ⊆ Superset, then Uniform<Subset> ⊆ Superset

Source§

impl<Superset, Subset> SubsetOf<Uniform<Superset>> for Lower<Subset>
where Superset: CharProfile, Subset: CharProfile + SubsetOf<Superset>,

Proof: If Subset ⊆ Superset, then Lower<Subset> ⊆ Uniform<Superset>

Source§

impl<Superset, Subset> SubsetOf<Uniform<Superset>> for Uniform<Subset>
where Superset: CharProfile, Subset: CharProfile + SubsetOf<Superset>,

Proof: If Subset ⊆ Superset, then Uniform<Subset> ⊆ Uniform<Superset>

Source§

impl<Superset, Subset> SubsetOf<Uniform<Superset>> for Upper<Subset>
where Superset: CharProfile, Subset: CharProfile + SubsetOf<Superset>,

Proof: If Subset ⊆ Superset, then Upper<Subset> ⊆ Uniform<Superset>

Auto Trait Implementations§

§

impl<P> Freeze for Uniform<P>
where PhantomData<P>: Freeze,

§

impl<P> RefUnwindSafe for Uniform<P>

§

impl<P> Send for Uniform<P>
where PhantomData<P>: Send,

§

impl<P> Sync for Uniform<P>
where PhantomData<P>: Sync,

§

impl<P> Unpin for Uniform<P>
where PhantomData<P>: Unpin,

§

impl<P> UnsafeUnpin for Uniform<P>

§

impl<P> UnwindSafe for Uniform<P>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.