pub enum D2ElementType {
Token(D2TokenType),
Root,
Shape,
Connection,
Container,
Error,
}Expand description
Element types for the D2 AST.
Variants§
Token(D2TokenType)
Token.
Root
Root node.
Shape
Shape definition.
Connection
Connection definition.
Container
Container definition.
Error
Parsing error.
Trait Implementations§
Source§impl Clone for D2ElementType
impl Clone for D2ElementType
Source§fn clone(&self) -> D2ElementType
fn clone(&self) -> D2ElementType
Returns a duplicate 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 D2ElementType
impl Debug for D2ElementType
Source§impl<'de> Deserialize<'de> for D2ElementType
impl<'de> Deserialize<'de> for D2ElementType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl ElementType for D2ElementType
impl ElementType for D2ElementType
Source§type Role = UniversalElementRole
type Role = UniversalElementRole
The associated role type for this element kind.
Source§fn is_role(&self, role: Self::Role) -> bool
fn is_role(&self, role: Self::Role) -> bool
Returns true if this element matches the specified language-specific role.
Source§fn is_universal(&self, role: UniversalElementRole) -> bool
fn is_universal(&self, role: UniversalElementRole) -> bool
Returns true if this element matches the specified universal role.
Source§impl From<D2TokenType> for D2ElementType
impl From<D2TokenType> for D2ElementType
Source§fn from(token: D2TokenType) -> Self
fn from(token: D2TokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for D2ElementType
impl Hash for D2ElementType
Source§impl PartialEq for D2ElementType
impl PartialEq for D2ElementType
Source§impl Serialize for D2ElementType
impl Serialize for D2ElementType
impl Copy for D2ElementType
impl Eq for D2ElementType
impl StructuralPartialEq for D2ElementType
Auto Trait Implementations§
impl Freeze for D2ElementType
impl RefUnwindSafe for D2ElementType
impl Send for D2ElementType
impl Sync for D2ElementType
impl Unpin for D2ElementType
impl UnsafeUnpin for D2ElementType
impl UnwindSafe for D2ElementType
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