Struct glsl_lang::ast::TranslationUnit
source · pub struct TranslationUnit(pub Vec<Node<ExternalDeclarationData>>);
Expand description
Starting rule.
Tuple Fields§
§0: Vec<Node<ExternalDeclarationData>>
Trait Implementations§
source§impl Clone for TranslationUnit
impl Clone for TranslationUnit
source§fn clone(&self) -> TranslationUnit
fn clone(&self) -> TranslationUnit
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 TranslationUnit
impl Debug for TranslationUnit
source§impl<'de> Deserialize<'de> for TranslationUnit
impl<'de> Deserialize<'de> for TranslationUnit
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TranslationUnit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TranslationUnit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Extractable<TranslationUnit> for ArraySpecifier
impl Extractable<TranslationUnit> for ArraySpecifier
source§impl Extractable<TranslationUnit> for AssignmentOp
impl Extractable<TranslationUnit> for AssignmentOp
source§impl Extractable<TranslationUnit> for CaseLabel
impl Extractable<TranslationUnit> for CaseLabel
source§impl Extractable<TranslationUnit> for Declaration
impl Extractable<TranslationUnit> for Declaration
source§impl Extractable<TranslationUnit> for Expr
impl Extractable<TranslationUnit> for Expr
source§impl Extractable<TranslationUnit> for ExprStatement
impl Extractable<TranslationUnit> for ExprStatement
source§impl Extractable<TranslationUnit> for FunIdentifier
impl Extractable<TranslationUnit> for FunIdentifier
source§impl Extractable<TranslationUnit> for JumpStatement
impl Extractable<TranslationUnit> for JumpStatement
source§impl Extractable<TranslationUnit> for LayoutQualifier
impl Extractable<TranslationUnit> for LayoutQualifier
source§impl Extractable<TranslationUnit> for Preprocessor
impl Extractable<TranslationUnit> for Preprocessor
source§impl Extractable<TranslationUnit> for Statement
impl Extractable<TranslationUnit> for Statement
source§impl Extractable<TranslationUnit> for StructSpecifier
impl Extractable<TranslationUnit> for StructSpecifier
source§impl Extractable<TranslationUnit> for SwitchStatement
impl Extractable<TranslationUnit> for SwitchStatement
source§impl Extractable<TranslationUnit> for TypeQualifier
impl Extractable<TranslationUnit> for TypeQualifier
source§impl Extractable<TranslationUnit> for TypeSpecifier
impl Extractable<TranslationUnit> for TypeSpecifier
source§impl Extractable<TranslationUnit> for UnaryOp
impl Extractable<TranslationUnit> for UnaryOp
source§impl Extractable<TranslationUnit> for TranslationUnit
impl Extractable<TranslationUnit> for TranslationUnit
source§impl HasParser for TranslationUnit
impl HasParser for TranslationUnit
source§type Parser = TranslationUnitParser
type Parser = TranslationUnitParser
Type of the parser to create
source§impl Host for TranslationUnit
impl Host for TranslationUnit
source§impl HostMut for TranslationUnit
impl HostMut for TranslationUnit
source§fn visit_mut<V>(&mut self, visitor: &mut V)where
V: VisitorMut,
fn visit_mut<V>(&mut self, visitor: &mut V)where
V: VisitorMut,
Visit an AST node.
source§impl NodeContent for TranslationUnit
impl NodeContent for TranslationUnit
source§fn into_node<T>(self) -> Node<T>where
T: From<Self> + NodeContent,
fn into_node<T>(self) -> Node<T>where
T: From<Self> + NodeContent,
Convert the contents into a node
source§fn spanned(self, start: LexerPosition, end: LexerPosition) -> Node<Self>
fn spanned(self, start: LexerPosition, end: LexerPosition) -> Node<Self>
Add span information to a syntax node
source§impl NodeContentDisplay for TranslationUnit
impl NodeContentDisplay for TranslationUnit
source§impl PartialEq for TranslationUnit
impl PartialEq for TranslationUnit
source§impl Serialize for TranslationUnit
impl Serialize for TranslationUnit
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for TranslationUnit
Auto Trait Implementations§
impl Freeze for TranslationUnit
impl RefUnwindSafe for TranslationUnit
impl Send for TranslationUnit
impl Sync for TranslationUnit
impl Unpin for TranslationUnit
impl UnwindSafe for TranslationUnit
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
)source§impl<T> DefaultParse for Twhere
T: Parse,
impl<T> DefaultParse for Twhere
T: Parse,
source§fn parse<'i>(
source: <Lexer<'i> as LangLexer<'i>>::Input,
) -> Result<T, Located<ParseErrorKind<<<Lexer<'i> as LangLexer<'i>>::Iter as HasLexerError>::Error>>>
fn parse<'i>( source: <Lexer<'i> as LangLexer<'i>>::Input, ) -> Result<T, Located<ParseErrorKind<<<Lexer<'i> as LangLexer<'i>>::Iter as HasLexerError>::Error>>>
Parse the input source
source§fn parse_with_options<'i>(
source: <Lexer<'i> as LangLexer<'i>>::Input,
opts: &ParseOptions,
) -> Result<(T, ParseContext, <Lexer<'i> as LangLexer<'i>>::Iter), Located<ParseErrorKind<<<Lexer<'i> as LangLexer<'i>>::Iter as HasLexerError>::Error>>>
fn parse_with_options<'i>( source: <Lexer<'i> as LangLexer<'i>>::Input, opts: &ParseOptions, ) -> Result<(T, ParseContext, <Lexer<'i> as LangLexer<'i>>::Iter), Located<ParseErrorKind<<<Lexer<'i> as LangLexer<'i>>::Iter as HasLexerError>::Error>>>
Parse the input source with the given options
source§fn parse_with_context<'i>(
source: <Lexer<'i> as LangLexer<'i>>::Input,
ctx: &ParseContext,
) -> Result<(T, ParseContext, <Lexer<'i> as LangLexer<'i>>::Iter), Located<ParseErrorKind<<<Lexer<'i> as LangLexer<'i>>::Iter as HasLexerError>::Error>>>
fn parse_with_context<'i>( source: <Lexer<'i> as LangLexer<'i>>::Input, ctx: &ParseContext, ) -> Result<(T, ParseContext, <Lexer<'i> as LangLexer<'i>>::Iter), Located<ParseErrorKind<<<Lexer<'i> as LangLexer<'i>>::Iter as HasLexerError>::Error>>>
Parse the input source with the given context
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 moresource§impl<T> NodeDisplay for Twhere
T: NodeContentDisplay,
impl<T> NodeDisplay for Twhere
T: NodeContentDisplay,
source§impl<T> Parsable for Twhere
T: Extractable<TranslationUnit>,
impl<T> Parsable for Twhere
T: Extractable<TranslationUnit>,
source§fn parse_with_options<'i>(
source: &'i str,
opts: &ParseOptions,
) -> Result<(T, ParseContext), Located<ParseErrorKind<<Lexer<'i> as HasLexerError>::Error>>>
fn parse_with_options<'i>( source: &'i str, opts: &ParseOptions, ) -> Result<(T, ParseContext), Located<ParseErrorKind<<Lexer<'i> as HasLexerError>::Error>>>
Parse the input source with the given options
source§fn parse_with_context<'i>(
source: &'i str,
ctx: &ParseContext,
) -> Result<(T, ParseContext), Located<ParseErrorKind<<Lexer<'i> as HasLexerError>::Error>>>
fn parse_with_context<'i>( source: &'i str, ctx: &ParseContext, ) -> Result<(T, ParseContext), Located<ParseErrorKind<<Lexer<'i> as HasLexerError>::Error>>>
Parse the input source with the given context
source§fn parse(
source: &str,
) -> Result<Self, ParseError<<DefaultLexer<'_> as HasLexerError>::Error>>
fn parse( source: &str, ) -> Result<Self, ParseError<<DefaultLexer<'_> as HasLexerError>::Error>>
Parse the input source
source§impl<T> Parse for Twhere
T: HasParser,
impl<T> Parse for Twhere
T: HasParser,
source§fn parse<'i, L>(
source: <L as LangLexer<'i>>::Input,
) -> Result<T, Located<ParseErrorKind<<<L as LangLexer<'i>>::Iter as HasLexerError>::Error>>>where
L: LangLexer<'i>,
fn parse<'i, L>(
source: <L as LangLexer<'i>>::Input,
) -> Result<T, Located<ParseErrorKind<<<L as LangLexer<'i>>::Iter as HasLexerError>::Error>>>where
L: LangLexer<'i>,
Parse the input source
source§fn parse_with_options<'i, L>(
source: <L as LangLexer<'i>>::Input,
opts: &ParseOptions,
) -> Result<(T, ParseContext, <L as LangLexer<'i>>::Iter), Located<ParseErrorKind<<<L as LangLexer<'i>>::Iter as HasLexerError>::Error>>>where
L: LangLexer<'i>,
fn parse_with_options<'i, L>(
source: <L as LangLexer<'i>>::Input,
opts: &ParseOptions,
) -> Result<(T, ParseContext, <L as LangLexer<'i>>::Iter), Located<ParseErrorKind<<<L as LangLexer<'i>>::Iter as HasLexerError>::Error>>>where
L: LangLexer<'i>,
Parse the input source with the given options
source§fn parse_with_context<'i, L>(
source: <L as LangLexer<'i>>::Input,
ctx: &ParseContext,
) -> Result<(T, ParseContext, <L as LangLexer<'i>>::Iter), Located<ParseErrorKind<<<L as LangLexer<'i>>::Iter as HasLexerError>::Error>>>where
L: LangLexer<'i>,
fn parse_with_context<'i, L>(
source: <L as LangLexer<'i>>::Input,
ctx: &ParseContext,
) -> Result<(T, ParseContext, <L as LangLexer<'i>>::Iter), Located<ParseErrorKind<<<L as LangLexer<'i>>::Iter as HasLexerError>::Error>>>where
L: LangLexer<'i>,
Parse the input source with the given context