pub struct PrimitiveToken {
pub content: String,
pub span: Option<PrimitiveSpan>,
}
Expand description
Primitive representation of a single token.
Fields§
§content: String
Plain code content that the token represents (includes whitespaces).
span: Option<PrimitiveSpan>
Span of the token.
Implementations§
Source§impl PrimitiveToken
impl PrimitiveToken
Sourcepub fn new(content: String, span: Option<PrimitiveSpan>) -> Self
pub fn new(content: String, span: Option<PrimitiveSpan>) -> Self
Creates a new primitive token based upon content and provided span.
Auto Trait Implementations§
impl Freeze for PrimitiveToken
impl RefUnwindSafe for PrimitiveToken
impl Send for PrimitiveToken
impl Sync for PrimitiveToken
impl Unpin for PrimitiveToken
impl UnwindSafe for PrimitiveToken
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