pub struct CustomType {
pub identifier: Identifier,
pub scope: Scope,
pub attributes: Vec<WeakPtr<Attribute>>,
pub comment: Option<DocComment>,
pub span: Span,
/* private fields */
}Fields§
§identifier: Identifier§scope: Scope§attributes: Vec<WeakPtr<Attribute>>§comment: Option<DocComment>§span: SpanImplementations§
Source§impl CustomType
impl CustomType
Sourcepub fn visit_with(&self, visitor: &mut impl Visitor)
pub fn visit_with(&self, visitor: &mut impl Visitor)
Visits the CustomType with the provided visitor.
This function delegates to visitor.visit_custom_type.
Trait Implementations§
Source§impl AsAttributables for CustomType
impl AsAttributables for CustomType
fn concrete_attributable(&self) -> Attributables<'_>
Source§impl AsEntities for CustomType
impl AsEntities for CustomType
fn concrete_entity(&self) -> Entities<'_>
Source§impl AsTypes for CustomType
impl AsTypes for CustomType
fn concrete_type(&self) -> Types<'_>
Source§impl Attributable for CustomType
impl Attributable for CustomType
Source§impl Commentable for CustomType
impl Commentable for CustomType
fn comment(&self) -> Option<&DocComment>
Source§impl Debug for CustomType
impl Debug for CustomType
Source§impl NamedSymbol for CustomType
impl NamedSymbol for CustomType
fn identifier(&self) -> &str
fn raw_identifier(&self) -> &Identifier
fn module_scoped_identifier(&self) -> String
fn parser_scoped_identifier(&self) -> String
Source§impl ScopedSymbol for CustomType
impl ScopedSymbol for CustomType
fn parser_scope(&self) -> &str
fn module_scope(&self) -> &str
fn get_module(&self) -> &Module
fn get_raw_scope(&self) -> &Scope
Source§impl<'a> TryFrom<&'a Node> for &'a CustomType
impl<'a> TryFrom<&'a Node> for &'a CustomType
Source§fn try_from(node: &'a Node) -> Result<&'a CustomType, Self::Error>
fn try_from(node: &'a Node) -> Result<&'a CustomType, Self::Error>
Attempts to unwrap a node to the specified concrete type.
If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.
Source§type Error = LookupError
type Error = LookupError
The type returned in the event of a conversion error.
Source§impl Type for CustomType
impl Type for CustomType
fn type_string(&self) -> String
fn fixed_wire_size(&self) -> Option<u32>
fn is_class_type(&self) -> bool
fn tag_format(&self) -> Option<TagFormat>
fn supported_encodings(&self) -> SupportedEncodings
impl Entity for CustomType
Auto Trait Implementations§
impl Freeze for CustomType
impl !RefUnwindSafe for CustomType
impl !Send for CustomType
impl !Sync for CustomType
impl Unpin for CustomType
impl !UnwindSafe for CustomType
Blanket Implementations§
Source§impl<A> AttributeFunctions for Awhere
A: Attributable + ?Sized,
impl<A> AttributeFunctions for Awhere
A: Attributable + ?Sized,
Source§fn has_attribute<T>(&self) -> boolwhere
T: AttributeKind + 'static,
fn has_attribute<T>(&self) -> boolwhere
T: AttributeKind + 'static,
Returns true if this element has an attribute of the specified type and false otherwise.
Source§fn find_attribute<T>(&self) -> Option<&T>where
T: AttributeKind + 'static,
fn find_attribute<T>(&self) -> Option<&T>where
T: AttributeKind + 'static,
Returns the first attribute of the specified type that is applied to this element.
If no attributes of the specified type can be found, this returns
None.Source§fn find_attributes<T>(&self) -> Vec<&T>where
T: AttributeKind + 'static,
fn find_attributes<T>(&self) -> Vec<&T>where
T: AttributeKind + 'static,
Returns all the attributes applied to this element that are of the specified type.
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