Enum glsl_lang::ast::FunIdentifierData
source · pub enum FunIdentifierData {
TypeSpecifier(Box<Node<TypeSpecifierData>>),
Expr(Box<Node<ExprData>>),
}
Expand description
Function identifier.
Variants§
TypeSpecifier(Box<Node<TypeSpecifierData>>)
Type name used for the function name (as a constructor)
Expr(Box<Node<ExprData>>)
Expression used for the function name
Implementations§
source§impl FunIdentifierData
impl FunIdentifierData
sourcepub fn ident(i: impl Into<IdentifierData>) -> FunIdentifierData
pub fn ident(i: impl Into<IdentifierData>) -> FunIdentifierData
Create a function identifier from an identifier
sourcepub fn as_ident(&self) -> Option<&Node<IdentifierData>>
pub fn as_ident(&self) -> Option<&Node<IdentifierData>>
Try to parse this function identifier as a raw identifier
sourcepub fn as_ident_mut(&mut self) -> Option<&mut Node<IdentifierData>>
pub fn as_ident_mut(&mut self) -> Option<&mut Node<IdentifierData>>
Try to parse this function identifier as a mutable raw identifier
sourcepub fn as_rs_ident(&self) -> Option<&str>
pub fn as_rs_ident(&self) -> Option<&str>
Try to parse this function identifier as a glsl-lang-quote
Rust identifier
Trait Implementations§
source§impl Clone for FunIdentifierData
impl Clone for FunIdentifierData
source§fn clone(&self) -> FunIdentifierData
fn clone(&self) -> FunIdentifierData
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 FunIdentifierData
impl Debug for FunIdentifierData
source§impl<'de> Deserialize<'de> for FunIdentifierData
impl<'de> Deserialize<'de> for FunIdentifierData
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FunIdentifierData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FunIdentifierData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Node<FunIdentifierData>> for FunIdentifierData
impl From<Node<FunIdentifierData>> for FunIdentifierData
source§fn from(node: Node<FunIdentifierData>) -> FunIdentifierData
fn from(node: Node<FunIdentifierData>) -> FunIdentifierData
Converts to this type from the input type.
source§impl NodeContent for FunIdentifierData
impl NodeContent for FunIdentifierData
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 FunIdentifierData
impl NodeContentDisplay for FunIdentifierData
source§impl PartialEq for FunIdentifierData
impl PartialEq for FunIdentifierData
source§impl Serialize for FunIdentifierData
impl Serialize for FunIdentifierData
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 FunIdentifierData
Auto Trait Implementations§
impl Freeze for FunIdentifierData
impl RefUnwindSafe for FunIdentifierData
impl Send for FunIdentifierData
impl Sync for FunIdentifierData
impl Unpin for FunIdentifierData
impl UnwindSafe for FunIdentifierData
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> 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