Enum glsl_lang_pp::processor::event::Event
source · pub enum Event {
Error {
error: Error,
masked: bool,
},
EnterFile {
file_id: FileId,
path: PathBuf,
canonical_path: PathBuf,
},
Token {
token: OutputToken,
masked: bool,
},
Directive {
directive: EventDirective,
masked: bool,
},
}
Variants§
Implementations§
source§impl Event
impl Event
pub fn enter_file(file_id: FileId) -> Self
pub fn token<T: TokenLike>(token: T, masked: bool) -> Self
pub fn directive<D: Into<DirectiveKind>>(d: Directive<D>, masked: bool) -> Self
pub fn directive_errors<D: Into<DirectiveKind>>( d: Directive<D>, masked: bool, errors: impl IntoIterator<Item = impl Into<ErrorKind>>, location: &ExpandLocation, ) -> Self
pub fn directive_error<E: Into<ProcessingErrorKind>>( (error, node): (E, SyntaxNode<PreprocessorLang>), location: &ExpandLocation, masked: bool, ) -> Self
pub fn error<T: Into<ErrorKind>>( e: T, pos: impl Into<TextRange>, location: &ExpandLocation, masked: bool, ) -> Self
pub fn map_error<T: Into<ErrorKind>>(e: Located<T>, masked: bool) -> Self
pub fn is_token(&self) -> bool
pub fn as_token(&self) -> Option<&OutputToken>
pub fn into_token(self) -> Option<OutputToken>
Trait Implementations§
source§impl From<(EventDirective, bool)> for Event
impl From<(EventDirective, bool)> for Event
source§fn from(value: (EventDirective, bool)) -> Self
fn from(value: (EventDirective, bool)) -> Self
Converts to this type from the input type.
source§impl From<(OutputToken, bool)> for Event
impl From<(OutputToken, bool)> for Event
source§fn from(value: (OutputToken, bool)) -> Self
fn from(value: (OutputToken, bool)) -> Self
Converts to this type from the input type.
source§impl From<Event> for ExpandEvent
impl From<Event> for ExpandEvent
source§impl From<Event> for HandleNodeResult
impl From<Event> for HandleNodeResult
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.
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl !RefUnwindSafe for Event
impl !Send for Event
impl !Sync for Event
impl Unpin for Event
impl !UnwindSafe for Event
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
§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