Struct gluon_base::metadata::BaseMetadata
source · pub struct BaseMetadata<'ast> {
pub metadata: Option<&'ast mut Metadata>,
}
Fields§
§metadata: Option<&'ast mut Metadata>
Implementations§
source§impl<'ast> BaseMetadata<'ast>
impl<'ast> BaseMetadata<'ast>
pub fn has_data(&self) -> bool
pub fn merge(&mut self, metadata: BaseMetadata<'ast>)
pub fn comment(&self) -> Option<&Comment>
pub fn get_attribute(&self, name: &str) -> Option<&str>
pub fn attributes(&self) -> impl Iterator<Item = &Attribute>
pub fn to_metadata(&self) -> Metadata
Trait Implementations§
source§impl<'ast, Id> AstClone<'ast, Id> for BaseMetadata<'ast>where
Id: Clone,
impl<'ast, Id> AstClone<'ast, Id> for BaseMetadata<'ast>where
Id: Clone,
source§impl<'ast> Debug for BaseMetadata<'ast>
impl<'ast> Debug for BaseMetadata<'ast>
source§impl<'ast> Default for BaseMetadata<'ast>
impl<'ast> Default for BaseMetadata<'ast>
source§fn default() -> BaseMetadata<'ast>
fn default() -> BaseMetadata<'ast>
Returns the “default value” for a type. Read more
source§impl From<BaseMetadata<'_>> for Metadata
impl From<BaseMetadata<'_>> for Metadata
source§fn from(meta: BaseMetadata<'_>) -> Self
fn from(meta: BaseMetadata<'_>) -> Self
Converts to this type from the input type.
source§impl<'ast> Hash for BaseMetadata<'ast>
impl<'ast> Hash for BaseMetadata<'ast>
source§impl<'ast> PartialEq for BaseMetadata<'ast>
impl<'ast> PartialEq for BaseMetadata<'ast>
source§fn eq(&self, other: &BaseMetadata<'ast>) -> bool
fn eq(&self, other: &BaseMetadata<'ast>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'ast> Eq for BaseMetadata<'ast>
impl<'ast> StructuralEq for BaseMetadata<'ast>
impl<'ast> StructuralPartialEq for BaseMetadata<'ast>
Auto Trait Implementations§
impl<'ast> RefUnwindSafe for BaseMetadata<'ast>
impl<'ast> Send for BaseMetadata<'ast>
impl<'ast> Sync for BaseMetadata<'ast>
impl<'ast> Unpin for BaseMetadata<'ast>
impl<'ast> !UnwindSafe for BaseMetadata<'ast>
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