pub struct EnumTypeDefinition<'src> {
pub description: Option<StringValue<'src>>,
pub directives: Vec<DirectiveAnnotation<'src>>,
pub name: Name<'src>,
pub span: ByteSpan,
pub syntax: Option<Box<EnumTypeDefinitionSyntax<'src>>>,
pub values: Vec<EnumValueDefinition<'src>>,
}Expand description
An enum type definition.
See Enums in the spec.
Fields§
§description: Option<StringValue<'src>>§directives: Vec<DirectiveAnnotation<'src>>§name: Name<'src>§span: ByteSpan§syntax: Option<Box<EnumTypeDefinitionSyntax<'src>>>§values: Vec<EnumValueDefinition<'src>>Implementations§
Source§impl<'src> EnumTypeDefinition<'src>
impl<'src> EnumTypeDefinition<'src>
Sourcepub fn name_value(&self) -> &str
pub fn name_value(&self) -> &str
Returns the name of this enum type definition as a string slice.
Convenience accessor for self.name.value.
Source§impl EnumTypeDefinition<'_>
impl EnumTypeDefinition<'_>
Sourcepub fn append_source(&self, sink: &mut String, source: Option<&str>)
pub fn append_source(&self, sink: &mut String, source: Option<&str>)
Sourcepub fn byte_span(&self) -> ByteSpan
pub fn byte_span(&self) -> ByteSpan
Returns this enum type definition’s byte-offset span within the source text.
The returned ByteSpan can be resolved to line/column
positions via source_span() or
ByteSpan::resolve().
Sourcepub fn source_span(&self, source_map: &SourceMap<'_>) -> Option<SourceSpan>
pub fn source_span(&self, source_map: &SourceMap<'_>) -> Option<SourceSpan>
Trait Implementations§
Source§impl AstNode for EnumTypeDefinition<'_>
impl AstNode for EnumTypeDefinition<'_>
Source§fn byte_span(&self) -> ByteSpan
fn byte_span(&self) -> ByteSpan
Returns this enum type definition’s byte-offset span within the source text.
The returned ByteSpan can be resolved to line/column
positions via source_span() or
ByteSpan::resolve().
Source§fn source_span(&self, source_map: &SourceMap<'_>) -> Option<SourceSpan>
fn source_span(&self, source_map: &SourceMap<'_>) -> Option<SourceSpan>
Source§impl<'src> Clone for EnumTypeDefinition<'src>
impl<'src> Clone for EnumTypeDefinition<'src>
Source§fn clone(&self) -> EnumTypeDefinition<'src>
fn clone(&self) -> EnumTypeDefinition<'src>
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<'src> Debug for EnumTypeDefinition<'src>
impl<'src> Debug for EnumTypeDefinition<'src>
Source§impl<'src> PartialEq for EnumTypeDefinition<'src>
impl<'src> PartialEq for EnumTypeDefinition<'src>
impl<'src> StructuralPartialEq for EnumTypeDefinition<'src>
Auto Trait Implementations§
impl<'src> Freeze for EnumTypeDefinition<'src>
impl<'src> RefUnwindSafe for EnumTypeDefinition<'src>
impl<'src> Send for EnumTypeDefinition<'src>
impl<'src> Sync for EnumTypeDefinition<'src>
impl<'src> Unpin for EnumTypeDefinition<'src>
impl<'src> UnsafeUnpin for EnumTypeDefinition<'src>
impl<'src> UnwindSafe for EnumTypeDefinition<'src>
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