Skip to main content

Punctuation

Enum Punctuation 

Source
pub enum Punctuation {
Show 53 variants Eq(Eq), Lt(Lt), Le(Le), EqEq(EqEq), Ne(Ne), Ge(Ge), Gt(Gt), AndAnd(AndAnd), OrOr(OrOr), Not(Not), Tilde(Tilde), Plus(Plus), Minus(Minus), Star(Star), Slash(Slash), Percent(Percent), Caret(Caret), And(And), Or(Or), Shl(Shl), Shr(Shr), PlusEq(PlusEq), MinusEq(MinusEq), StarEq(StarEq), SlashEq(SlashEq), PercentEq(PercentEq), CaretEq(CaretEq), AndEq(AndEq), OrEq(OrEq), ShlEq(ShlEq), ShrEq(ShrEq), At(At), Dot(Dot), DotDot(DotDot), DotDotDot(DotDotDot), DotDotEq(DotDotEq), Comma(Comma), Semi(Semi), Colon(Colon), PathSep(PathSep), RArrow(RArrow), LArrow(LArrow), FatArrow(FatArrow), Pound(Pound), Dollar(Dollar), Question(Question), Underscore(Underscore), ParenOpen(ParenOpen), ParenClose(ParenClose), BracketOpen(BracketOpen), BracketClose(BracketClose), BracesOpen(BracesOpen), BracesClose(BracesClose),
}
Expand description

Punctuation

Variants§

§

Eq(Eq)

§

Lt(Lt)

§

Le(Le)

§

EqEq(EqEq)

§

Ne(Ne)

§

Ge(Ge)

§

Gt(Gt)

§

AndAnd(AndAnd)

§

OrOr(OrOr)

§

Not(Not)

§

Tilde(Tilde)

§

Plus(Plus)

§

Minus(Minus)

§

Star(Star)

§

Slash(Slash)

§

Percent(Percent)

§

Caret(Caret)

§

And(And)

§

Or(Or)

§

Shl(Shl)

§

Shr(Shr)

§

PlusEq(PlusEq)

§

MinusEq(MinusEq)

§

StarEq(StarEq)

§

SlashEq(SlashEq)

§

PercentEq(PercentEq)

§

CaretEq(CaretEq)

§

AndEq(AndEq)

§

OrEq(OrEq)

§

ShlEq(ShlEq)

§

ShrEq(ShrEq)

§

At(At)

§

Dot(Dot)

§

DotDot(DotDot)

§

DotDotDot(DotDotDot)

§

DotDotEq(DotDotEq)

§

Comma(Comma)

§

Semi(Semi)

§

Colon(Colon)

§

PathSep(PathSep)

§

RArrow(RArrow)

§

LArrow(LArrow)

§

FatArrow(FatArrow)

§

Pound(Pound)

§

Dollar(Dollar)

§

Question(Question)

§

Underscore(Underscore)

§

ParenOpen(ParenOpen)

§

ParenClose(ParenClose)

§

BracketOpen(BracketOpen)

§

BracketClose(BracketClose)

§

BracesOpen(BracesOpen)

§

BracesClose(BracesClose)

Trait Implementations§

Source§

impl Clone for Punctuation

Source§

fn clone(&self) -> Punctuation

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 Debug for Punctuation

Source§

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

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

impl<'de> Deserialize<'de> for Punctuation

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Format<WhitespaceConfig, ()> for Punctuation

Source§

fn format( &mut self, ctx: &mut Context<'_>, prefix_ws: WhitespaceConfig, args: (), ) -> FormatOutput

Formats this type.
Source§

impl Formattable for Punctuation

Source§

fn with_prefix_ws<WITH_PREFIX_WS_O>( &mut self, ctx: &mut Context<'_>, f: &mut impl FnMut(&mut Whitespace, &mut Context<'_>) -> WITH_PREFIX_WS_O, ) -> Result<WITH_PREFIX_WS_O, ControlFlow<()>>

Accesses the prefix whitespace of this type. Read more
Source§

fn with_strings<WITH_STRINGS_O>( &mut self, ctx: &mut Context<'_>, exclude_prefix_ws: bool, f: &mut impl FnMut(&mut AstStr, &mut Context<'_>) -> ControlFlow<WITH_STRINGS_O>, ) -> ControlFlow<WITH_STRINGS_O, bool>

Iterates over all strings in this type. Read more
Source§

fn format_output(&mut self, ctx: &mut Context<'_>) -> FormatOutput

Returns the formatting output for this type, without formatting it.
Source§

fn prefix_ws_is_pure(&mut self, ctx: &mut Context<'_>) -> Option<bool>

Returns if the prefix whitespace is pure.
Source§

fn prefix_ws_join_prefix( &mut self, ctx: &mut Context<'_>, ws: Whitespace, ) -> Result<(), Whitespace>

Joins a string as a prefix onto the prefix whitespace of this type.
Source§

impl Parse for Punctuation

Source§

type Error = PunctuationError

Error type
Source§

fn parse_from(parser: &mut Parser) -> Result<Self, Self::Error>

Parses this type from input, mutating it in-place.
Source§

fn name() -> Option<impl Display>

A name for this type. Read more
Source§

impl PartialEq for Punctuation

Source§

fn eq(&self, other: &Punctuation) -> 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 Print for Punctuation

Source§

fn print(&self, f: &mut PrintFmt)

Prints this type onto a writer
Source§

fn print_non_ws(&self, f: &mut PrintFmt)

Prints this type onto a writer excluding whitespace Read more
Source§

fn print_to(&self, p: impl FnOnce(&Self, &mut PrintFmt)) -> PrintOutput

Prints this type using p as the printer function and returns the output
Source§

impl Serialize for Punctuation

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for Punctuation

Source§

impl StructuralPartialEq for Punctuation

Auto Trait Implementations§

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<R, T> FromRecursiveRoot<R> for T
where T: From<R>,

Source§

fn from_recursive_root(root: R, _parser: &mut Parser) -> T

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<R> IntoRecursiveRoot<R> for R

Source§

fn into_recursive_root(self, _parser: &mut Parser) -> R

Source§

impl<T, R> ParsableFrom<RecursiveWrapper<T, R>> for T

Source§

fn from_parsable(wrapper: RecursiveWrapper<T, R>) -> T

Source§

impl<T, U> ParsePeeked<U> for T
where T: Parse + From<U>,

Source§

fn parse_from_with_peeked( _parser: &mut Parser, parsed: U, ) -> Result<T, <T as Parse>::Error>

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, 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<R> TryFromRecursiveRoot<R> for R

Source§

fn try_from_recursive_root(root: R, _parser: &mut Parser) -> Option<R>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,