At

Struct At 

Source
pub struct At<S = (), C = (), Lang: ?Sized = ()> { /* private fields */ }
Expand description

The @ punctuator

Implementations§

Source§

impl At<()>

Source

pub const PHANTOM: Self

A phantom instance of the @ punctuator.

Source§

impl At

Source

pub const fn raw() -> &'static str

Returns the raw string literal of the @ punctuator.

Source§

impl<S> At<S>

Source

pub const fn new(span: S) -> Self

Creates a new punctuator with the given span.

Source§

impl<S, C> At<S, C>

Source

pub const fn with_content(span: S, content: C) -> Self

Creates a new @ punctuator with the given span and content.

Source§

impl<S, C, Lang: ?Sized> At<S, C, Lang>

Source

pub fn change_language<N: ?Sized>(self) -> At<S, C, N>

Changes the language type of the @ punctuator.

Source

pub const fn change_language_const<N: ?Sized>(self) -> At<S, C, N>
where S: Copy, C: Copy,

Changes the language type of the @ punctuator.

Source

pub const fn as_str(&self) -> &'static str

Returns the raw string literal of the @ punctuator.

Source

pub const fn span(&self) -> &S

Returns the span of the @ punctuator.

Source

pub const fn content(&self) -> &C

Returns a reference to the content of the @ punctuator.

Trait Implementations§

Source§

impl<S, C, Lang: ?Sized> AsRef<str> for At<S, C, Lang>

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<S, C, Lang: ?Sized> AsSpan<S> for At<S, C, Lang>

Source§

fn as_span(&self) -> &S

Consumes this element and returns the owned source span. Read more
Source§

impl<S, C, Lang: ?Sized> Borrow<str> for At<S, C, Lang>

Source§

fn borrow(&self) -> &str

Immutably borrows from an owned value. Read more
Source§

impl<'inp, T, S, C, Lang> Check<T> for At<S, C, Lang>
where T: PunctuatorToken<'inp> + ?Sized + 'inp, Lang: ?Sized,

Source§

fn check(&self, target: &T) -> bool

Check against the target.
Source§

impl<S: Clone, C: Clone, Lang: Clone + ?Sized> Clone for At<S, C, Lang>

Source§

fn clone(&self) -> At<S, C, Lang>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S: Debug, C: Debug, Lang: Debug + ?Sized> Debug for At<S, C, Lang>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S, C, Lang: ?Sized> Display for At<S, C, Lang>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S, C, Lang: ?Sized> DisplayCompact for At<S, C, Lang>

Source§

type Options = ()

The options type for controlling compact formatting.
Source§

fn fmt(&self, f: &mut Formatter<'_>, _: &Self::Options) -> Result

Formats the value in a compact, space-efficient way.
Source§

fn display<'a>(&'a self, options: &'a Self::Options) -> CompactDisplay<'a, Self>

Returns a wrapper that implements Display for compact formatting. Read more
Source§

impl<S, C, Lang: ?Sized> DisplayHuman for At<S, C, Lang>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value in a human-friendly way. Read more
Source§

fn display(&self) -> HumanDisplay<'_, Self>

Returns a wrapper that implements Display using the human-friendly format. Read more
Source§

impl<S, C, Lang: ?Sized> DisplayPretty for At<S, C, Lang>

Source§

type Options = ()

The options type for controlling pretty formatting.
Source§

fn fmt(&self, f: &mut Formatter<'_>, _: &Self::Options) -> Result

Formats the value in a human-friendly, readable way.
Source§

fn display<'a>(&'a self, options: &'a Self::Options) -> PrettyDisplay<'a, Self>

Returns a wrapper that implements Display for pretty formatting. Read more
Source§

impl<S: Hash, C: Hash, Lang: Hash + ?Sized> Hash for At<S, C, Lang>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<S, C, Lang: ?Sized> IntoComponents for At<S, C, Lang>

Source§

type Components = (S, C)

The tuple or struct type containing the decomposed components. Read more
Source§

fn into_components(self) -> Self::Components

Consumes this element and returns its constituent components. Read more
Source§

impl<S, C, Lang: ?Sized> IntoSpan<S> for At<S, C, Lang>

Source§

fn into_span(self) -> S

Consumes this element and returns the owned source span. Read more
Source§

impl<S, C, Lang: ?Sized> PartialEq<At<S, C, Lang>> for str

Source§

fn eq(&self, other: &At<S, C, Lang>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<S, C, Lang: ?Sized> PartialEq<str> for At<S, C, Lang>

Source§

fn eq(&self, other: &str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<S: PartialEq, C: PartialEq, Lang: PartialEq + ?Sized> PartialEq for At<S, C, Lang>

Source§

fn eq(&self, other: &At<S, C, Lang>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<S, C, Lang: ?Sized> PartialOrd<At<S, C, Lang>> for str

Source§

fn partial_cmp(&self, other: &At<S, C, Lang>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<S, C, Lang: ?Sized> PartialOrd<str> for At<S, C, Lang>

Source§

fn partial_cmp(&self, other: &str) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<S: Copy, C: Copy, Lang: Copy + ?Sized> Copy for At<S, C, Lang>

Source§

impl<S: Eq, C: Eq, Lang: Eq + ?Sized> Eq for At<S, C, Lang>

Source§

impl<S, C, Lang: ?Sized> StructuralPartialEq for At<S, C, Lang>

Auto Trait Implementations§

§

impl<S, C, Lang> Freeze for At<S, C, Lang>
where S: Freeze, C: Freeze, Lang: ?Sized,

§

impl<S, C, Lang> RefUnwindSafe for At<S, C, Lang>

§

impl<S, C, Lang> Send for At<S, C, Lang>
where S: Send, C: Send, Lang: Send + ?Sized,

§

impl<S, C, Lang> Sync for At<S, C, Lang>
where S: Sync, C: Sync, Lang: Sync + ?Sized,

§

impl<S, C, Lang> Unpin for At<S, C, Lang>
where S: Unpin, C: Unpin, Lang: Unpin + ?Sized,

§

impl<S, C, Lang> UnwindSafe for At<S, C, Lang>
where S: UnwindSafe, C: UnwindSafe, Lang: UnwindSafe + ?Sized,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.