Enum apollo_compiler::database::hir::Definition
source · pub enum Definition {
Show 17 variants
OperationDefinition(OperationDefinition),
FragmentDefinition(FragmentDefinition),
DirectiveDefinition(DirectiveDefinition),
ScalarTypeDefinition(ScalarTypeDefinition),
ObjectTypeDefinition(ObjectTypeDefinition),
InterfaceTypeDefinition(InterfaceTypeDefinition),
UnionTypeDefinition(UnionTypeDefinition),
EnumTypeDefinition(EnumTypeDefinition),
InputObjectTypeDefinition(InputObjectTypeDefinition),
SchemaDefinition(SchemaDefinition),
SchemaExtension(SchemaExtension),
ScalarTypeExtension(ScalarTypeExtension),
ObjectTypeExtension(ObjectTypeExtension),
InterfaceTypeExtension(InterfaceTypeExtension),
UnionTypeExtension(UnionTypeExtension),
EnumTypeExtension(EnumTypeExtension),
InputObjectTypeExtension(InputObjectTypeExtension),
}
Variants§
OperationDefinition(OperationDefinition)
FragmentDefinition(FragmentDefinition)
DirectiveDefinition(DirectiveDefinition)
ScalarTypeDefinition(ScalarTypeDefinition)
ObjectTypeDefinition(ObjectTypeDefinition)
InterfaceTypeDefinition(InterfaceTypeDefinition)
UnionTypeDefinition(UnionTypeDefinition)
EnumTypeDefinition(EnumTypeDefinition)
InputObjectTypeDefinition(InputObjectTypeDefinition)
SchemaDefinition(SchemaDefinition)
SchemaExtension(SchemaExtension)
ScalarTypeExtension(ScalarTypeExtension)
ObjectTypeExtension(ObjectTypeExtension)
InterfaceTypeExtension(InterfaceTypeExtension)
UnionTypeExtension(UnionTypeExtension)
EnumTypeExtension(EnumTypeExtension)
InputObjectTypeExtension(InputObjectTypeExtension)
Implementations§
source§impl Definition
impl Definition
pub fn name(&self) -> Option<&str>
pub fn name_src(&self) -> Option<&Name>
pub fn ty(&self) -> String
pub fn id(&self) -> Option<&Uuid>
pub fn field(&self, name: &str) -> Option<&FieldDefinition>
pub fn directives(&self) -> &[Directive]
sourcepub fn is_output_definition(&self) -> bool
pub fn is_output_definition(&self) -> bool
Returns true
if the definition is either a ScalarTypeDefinition
,
ObjectTypeDefinition
, InterfaceTypeDefinition
,
UnionTypeDefinition
, EnumTypeDefinition
.
sourcepub fn is_input_definition(&self) -> bool
pub fn is_input_definition(&self) -> bool
Returns true
if the definition is either a ScalarTypeDefinition
,
EnumTypeDefinition
, InputObjectTypeDefinition
.
sourcepub fn is_operation_definition(&self) -> bool
pub fn is_operation_definition(&self) -> bool
Returns true
if the definition is OperationDefinition
.
sourcepub fn is_fragment_definition(&self) -> bool
pub fn is_fragment_definition(&self) -> bool
Returns true
if the definition is FragmentDefinition
.
sourcepub fn is_directive_definition(&self) -> bool
pub fn is_directive_definition(&self) -> bool
Returns true
if the definition is DirectiveDefinition
.
sourcepub fn is_scalar_type_definition(&self) -> bool
pub fn is_scalar_type_definition(&self) -> bool
Returns true
if the definition is ScalarTypeDefinition
.
sourcepub fn is_object_type_definition(&self) -> bool
pub fn is_object_type_definition(&self) -> bool
Returns true
if the definition is ObjectTypeDefinition
.
sourcepub fn is_interface_type_definition(&self) -> bool
pub fn is_interface_type_definition(&self) -> bool
Returns true
if the definition is InterfaceTypeDefinition
.
sourcepub fn is_union_type_definition(&self) -> bool
pub fn is_union_type_definition(&self) -> bool
Returns true
if the definition is UnionTypeDefinition
.
sourcepub fn is_enum_type_definition(&self) -> bool
pub fn is_enum_type_definition(&self) -> bool
Returns true
if the definition is EnumTypeDefinition
.
sourcepub fn is_input_object_type_definition(&self) -> bool
pub fn is_input_object_type_definition(&self) -> bool
Returns true
if the definition is InputObjectTypeDefinition
.
sourcepub fn is_schema_definition(&self) -> bool
pub fn is_schema_definition(&self) -> bool
Returns true
if the definition is SchemaDefinition
.
Trait Implementations§
source§impl Clone for Definition
impl Clone for Definition
source§fn clone(&self) -> Definition
fn clone(&self) -> Definition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Definition
impl Debug for Definition
source§impl Hash for Definition
impl Hash for Definition
source§impl PartialEq<Definition> for Definition
impl PartialEq<Definition> for Definition
source§fn eq(&self, other: &Definition) -> bool
fn eq(&self, other: &Definition) -> bool
impl Eq for Definition
impl StructuralEq for Definition
impl StructuralPartialEq for Definition
Auto Trait Implementations§
impl RefUnwindSafe for Definition
impl Send for Definition
impl Sync for Definition
impl Unpin for Definition
impl UnwindSafe for Definition
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more