pub struct TriviaToken {
pub trivia: Trivia,
pub range: Range,
}Expand description
Trivia (whitespace/comments) attached to AST nodes. A trivia token with position information
Fields§
§trivia: TriviaThe trivia content
range: RangeThe source range of this trivia
Implementations§
Source§impl TriviaToken
impl TriviaToken
Sourcepub fn new(trivia: Trivia, range: Range) -> TriviaToken
pub fn new(trivia: Trivia, range: Range) -> TriviaToken
Create a new trivia token with the given content and range
Trait Implementations§
Source§impl Clone for TriviaToken
impl Clone for TriviaToken
Source§fn clone(&self) -> TriviaToken
fn clone(&self) -> TriviaToken
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 moreAuto Trait Implementations§
impl Freeze for TriviaToken
impl RefUnwindSafe for TriviaToken
impl Send for TriviaToken
impl Sync for TriviaToken
impl Unpin for TriviaToken
impl UnsafeUnpin for TriviaToken
impl UnwindSafe for TriviaToken
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