pub struct Concatenate;Expand description
A transformer that concatenates all elegible input tokens into a single identifier.
It ignores standard spacing and simply glues the string representations of the tokens together.
By “token”, this implies identifier and string literals (not including byte literals, c-strings, or other string type).
This performs a rolling approach, physically contiguous tokens of the same type will be concatenated into one of the same token type.
§Example
[< hello _ world "what" "ever" . "buddy" >]:concatenate -> hello_world "whatever" . "buddy"
Trait Implementations§
Source§impl Clone for Concatenate
impl Clone for Concatenate
Source§fn clone(&self) -> Concatenate
fn clone(&self) -> Concatenate
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Concatenate
impl Debug for Concatenate
Source§impl Default for Concatenate
impl Default for Concatenate
Source§fn default() -> Concatenate
fn default() -> Concatenate
Returns the “default value” for a type. Read more
Source§impl Hash for Concatenate
impl Hash for Concatenate
Source§impl Ord for Concatenate
impl Ord for Concatenate
Source§fn cmp(&self, other: &Concatenate) -> Ordering
fn cmp(&self, other: &Concatenate) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Concatenate
impl PartialEq for Concatenate
Source§impl PartialOrd for Concatenate
impl PartialOrd for Concatenate
Source§impl Pass for Concatenate
impl Pass for Concatenate
impl Copy for Concatenate
impl Eq for Concatenate
impl StructuralPartialEq for Concatenate
Auto Trait Implementations§
impl Freeze for Concatenate
impl RefUnwindSafe for Concatenate
impl Send for Concatenate
impl Sync for Concatenate
impl Unpin for Concatenate
impl UnsafeUnpin for Concatenate
impl UnwindSafe for Concatenate
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Transformer for T
impl<T> Transformer for T
Source§fn transform(
&mut self,
input: TokenStream,
argument: TokenStream,
) -> Result<TokenStream, Error>
fn transform( &mut self, input: TokenStream, argument: TokenStream, ) -> Result<TokenStream, Error>
Transforms an input token stream into an output one. Read more