pub struct Deprecation<'a, E: ExecutableDocument, S: SchemaDefinition, VV: VariableValues> { /* private fields */ }Expand description
The Deprecation analyzer will go over all ast-nodes of type Field, EnumValue, Argument and InputField when it encounters one that is marked as deprecated while being used in the executable document it will be added ot the list of [Offender]. This method will output the list of [Offender].
Trait Implementations§
Source§impl<'a, E: ExecutableDocument, S: SchemaDefinition, VV: VariableValues> Analyzer<'a, E, S, VV> for Deprecation<'a, E, S, VV>
impl<'a, E: ExecutableDocument, S: SchemaDefinition, VV: VariableValues> Analyzer<'a, E, S, VV> for Deprecation<'a, E, S, VV>
Source§impl<'a, E: ExecutableDocument, S: SchemaDefinition, VV: VariableValues> Visitor<'a, E, S, VV> for Deprecation<'a, E, S, VV>
impl<'a, E: ExecutableDocument, S: SchemaDefinition, VV: VariableValues> Visitor<'a, E, S, VV> for Deprecation<'a, E, S, VV>
type ExtraInfo = ()
fn new( _: &'a E::OperationDefinition, schema_definition: &'a S, variable_values: &'a VV, cache: &'a Cache<'a, E, S>, _: Self::ExtraInfo, ) -> Self
Source§fn visit_variable_definition(
&mut self,
variable_definition: &'a <E as ExecutableDocument>::VariableDefinition,
)
fn visit_variable_definition( &mut self, variable_definition: &'a <E as ExecutableDocument>::VariableDefinition, )
Source§fn visit_field(
&mut self,
field: &'a <E as ExecutableDocument>::Field,
field_definition: &'a <S as SchemaDefinition>::FieldDefinition,
_scoped_type: TypeDefinitionReference<'a, <S as SchemaDefinition>::TypeDefinition>,
included: bool,
)
fn visit_field( &mut self, field: &'a <E as ExecutableDocument>::Field, field_definition: &'a <S as SchemaDefinition>::FieldDefinition, _scoped_type: TypeDefinitionReference<'a, <S as SchemaDefinition>::TypeDefinition>, included: bool, )
fn visit_variable_argument( &mut self, argument: &'a <E as ExecutableDocument>::Argument<false>, input_value_definition: &'a <S as SchemaDefinition>::InputValueDefinition, )
Source§fn leave_field(
&mut self,
field: &'a <E as ExecutableDocument>::Field,
field_definition: &'a S::FieldDefinition,
scoped_type: TypeDefinitionReference<'a, S::TypeDefinition>,
included: bool,
)
fn leave_field( &mut self, field: &'a <E as ExecutableDocument>::Field, field_definition: &'a S::FieldDefinition, scoped_type: TypeDefinitionReference<'a, S::TypeDefinition>, included: bool, )
visit_field for more information about the variables.Auto Trait Implementations§
impl<'a, E, S, VV> Freeze for Deprecation<'a, E, S, VV>
impl<'a, E, S, VV> RefUnwindSafe for Deprecation<'a, E, S, VV>where
S: RefUnwindSafe,
VV: RefUnwindSafe,
<E as ExecutableDocument>::FragmentDefinition: RefUnwindSafe,
<E as ExecutableDocument>::VariableType: RefUnwindSafe,
<S as SchemaDefinition>::CustomScalarTypeDefinition: RefUnwindSafe,
<S as SchemaDefinition>::InputObjectTypeDefinition: RefUnwindSafe,
<S as SchemaDefinition>::EnumTypeDefinition: RefUnwindSafe,
impl<'a, E, S, VV> Send for Deprecation<'a, E, S, VV>where
S: Sync,
VV: Sync,
<E as ExecutableDocument>::FragmentDefinition: Sync,
<E as ExecutableDocument>::VariableType: Sync,
<S as SchemaDefinition>::CustomScalarTypeDefinition: Sync,
<S as SchemaDefinition>::InputObjectTypeDefinition: Sync,
<S as SchemaDefinition>::EnumTypeDefinition: Sync,
impl<'a, E, S, VV> Sync for Deprecation<'a, E, S, VV>where
S: Sync,
VV: Sync,
<E as ExecutableDocument>::FragmentDefinition: Sync,
<E as ExecutableDocument>::VariableType: Sync,
<S as SchemaDefinition>::CustomScalarTypeDefinition: Sync,
<S as SchemaDefinition>::InputObjectTypeDefinition: Sync,
<S as SchemaDefinition>::EnumTypeDefinition: Sync,
impl<'a, E, S, VV> Unpin for Deprecation<'a, E, S, VV>
impl<'a, E, S, VV> UnwindSafe for Deprecation<'a, E, S, VV>where
S: RefUnwindSafe,
VV: RefUnwindSafe,
<E as ExecutableDocument>::FragmentDefinition: RefUnwindSafe,
<E as ExecutableDocument>::VariableType: RefUnwindSafe,
<S as SchemaDefinition>::CustomScalarTypeDefinition: RefUnwindSafe,
<S as SchemaDefinition>::InputObjectTypeDefinition: RefUnwindSafe,
<S as SchemaDefinition>::EnumTypeDefinition: RefUnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);