Struct glsl_lang_pp::processor::event::OutputToken
source · pub struct OutputToken {
kind: SyntaxKind,
text: SmolStr,
source_range: NodeSpan,
}
Fields§
§kind: SyntaxKind
§text: SmolStr
§source_range: NodeSpan
Implementations§
source§impl OutputToken
impl OutputToken
pub fn new( kind: SyntaxKind, text: TokenText<'_>, source_range: NodeSpan, ) -> Self
pub fn new_error(source_range: NodeSpan) -> Self
pub fn from_token(value: &impl TokenLike) -> Self
pub fn kind(&self) -> SyntaxKind
pub fn text(&self) -> &str
pub fn text_range(&self) -> NodeSpan
Trait Implementations§
source§impl Clone for OutputToken
impl Clone for OutputToken
source§fn clone(&self) -> OutputToken
fn clone(&self) -> OutputToken
Returns a copy 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 OutputToken
impl Debug for OutputToken
source§impl From<(&SyntaxToken<PreprocessorLang>, FileId)> for OutputToken
impl From<(&SyntaxToken<PreprocessorLang>, FileId)> for OutputToken
source§fn from(value: (&SyntaxToken<PreprocessorLang>, FileId)) -> Self
fn from(value: (&SyntaxToken<PreprocessorLang>, FileId)) -> Self
Converts to this type from the input type.
source§impl From<(SyntaxToken<PreprocessorLang>, FileId)> for OutputToken
impl From<(SyntaxToken<PreprocessorLang>, FileId)> for OutputToken
source§fn from(value: (SyntaxToken<PreprocessorLang>, FileId)) -> Self
fn from(value: (SyntaxToken<PreprocessorLang>, FileId)) -> Self
Converts to this type from the input type.
source§impl From<OutputToken> for Event
impl From<OutputToken> for Event
source§fn from(token: OutputToken) -> Self
fn from(token: OutputToken) -> Self
Converts to this type from the input type.
source§impl PartialEq for OutputToken
impl PartialEq for OutputToken
source§impl TokenLike for OutputToken
impl TokenLike for OutputToken
impl Eq for OutputToken
impl StructuralPartialEq for OutputToken
Auto Trait Implementations§
impl Freeze for OutputToken
impl RefUnwindSafe for OutputToken
impl Send for OutputToken
impl Sync for OutputToken
impl Unpin for OutputToken
impl UnwindSafe for OutputToken
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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