Struct glsl_lang::parse::ParseContext [−][src]
Parsing context
Fields
opts: ParseOptions
Parsing options
data: Rc<RefCell<ParseContextData>>
Parsing data
Implementations
impl ParseContext
[src]
pub fn clone_inner(&self) -> Self
[src]
Clone the parsing data and return the cloned context
pub fn into_data(self) -> Option<ParseContextData>
[src]
Consume this ParseContext and return its data. Will fail if there are multiple references to this context’s data.
pub fn data(&self) -> Ref<'_, ParseContextData>
[src]
Obtain a reference to the context’s data
pub fn data_mut(&self) -> RefMut<'_, ParseContextData>
[src]
Obtain an exclusive reference to the context’s data
impl ParseContext
[src]
pub fn is_type_name(&self, name: &str) -> bool
[src]
Return true
if the given name is a type name
pub fn add_type_name(&self, name: Identifier) -> TypeName
[src]
Register name
as a new type name
pub fn new_identifier(&self, name: &Identifier, ctx: IdentifierContext)
[src]
Update the context data with a new identifier in a given context
impl ParseContext
[src]
pub fn has_comments(&self) -> bool
[src]
Return true
if this parsing context supports comments
pub fn add_comment(&self, comment: Comment)
[src]
Add a new comment to the parsed comments list
Trait Implementations
impl Clone for ParseContext
[src]
fn clone(&self) -> ParseContext
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ParseContext
[src]
impl Default for ParseContext
[src]
fn default() -> ParseContext
[src]
impl From<ParseOptions> for ParseContext
[src]
fn from(opts: ParseOptions) -> Self
[src]
impl PartialEq<ParseContext> for ParseContext
[src]
fn eq(&self, other: &ParseContext) -> bool
[src]
fn ne(&self, other: &ParseContext) -> bool
[src]
impl StructuralPartialEq for ParseContext
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ParseContext
impl !Send for ParseContext
impl !Sync for ParseContext
impl Unpin for ParseContext
impl !UnwindSafe for ParseContext
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoResult<T> for T
[src]
type Err = Infallible
pub fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,