Enum Spacing

pub enum Spacing

Whether a Punct is followed immediately by another Punct or followed by another token or whitespace.

Variants

Alone

E.g. + is Alone in + =, +ident or +().

Joint

E.g. + is Joint in += or ' is Joint in '#.

Additionally, single quote ' can join with identifiers to form lifetimes 'ident.

Trait Implementations

impl Clone for Spacing

fn clone(&self) -> Spacing

impl Copy for Spacing

impl Debug for Spacing

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

impl Eq for Spacing

impl PartialEq for Spacing

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

impl StructuralPartialEq for Spacing

Auto Trait Implementations

impl Freeze for Spacing

impl RefUnwindSafe for Spacing

impl Send for Spacing

impl Sync for Spacing

impl Unpin for Spacing

impl UnsafeUnpin for Spacing

impl UnwindSafe for Spacing

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> CloneToUninit for Spacing where T: Clone,

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

impl<T> From<T> for Spacing

fn from(t: T) -> T

Returns the argument unchanged.

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

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

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

fn into(self) -> U

Calls U::from(self).

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

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

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

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