pub struct EnumConverter;Expand description
Converter for Enum variant mutations (AddVariant, RemoveVariant)
Implementations§
Source§impl EnumConverter
impl EnumConverter
Trait Implementations§
Source§impl Clone for EnumConverter
impl Clone for EnumConverter
Source§fn clone(&self) -> EnumConverter
fn clone(&self) -> EnumConverter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EnumConverter
impl Debug for EnumConverter
Source§impl Default for EnumConverter
impl Default for EnumConverter
Source§fn default() -> EnumConverter
fn default() -> EnumConverter
Returns the “default value” for a type. Read more
Source§impl MutationConverter for EnumConverter
impl MutationConverter for EnumConverter
Source§fn spec_kinds(&self) -> &'static [&'static str]
fn spec_kinds(&self) -> &'static [&'static str]
Returns the spec kind(s) this converter handles
e.g., &[“Rename”] or &[“AddField”, “RemoveField”]
Source§fn convert_v2(
&self,
spec: &MutationSpec,
ctx: &AnalysisContext,
) -> Result<Vec<Box<dyn ASTRegApply>>, ConvertError>
fn convert_v2( &self, spec: &MutationSpec, ctx: &AnalysisContext, ) -> Result<Vec<Box<dyn ASTRegApply>>, ConvertError>
Convert MutationSpec to execution units (V2 API) Read more
Source§fn can_handle(&self, spec: &MutationSpec) -> bool
fn can_handle(&self, spec: &MutationSpec) -> bool
Check if this converter can handle the given spec
Source§fn convert(
&self,
_spec: &MutationSpec,
) -> Result<Box<dyn Mutation>, ConvertError>
fn convert( &self, _spec: &MutationSpec, ) -> Result<Box<dyn Mutation>, ConvertError>
👎Deprecated since 0.1.0:
Returns Box<dyn Mutation> for legacy apply(&mut PureFile). Use convert_v2() for ASTRegApply.
Convert a MutationSpec to a Mutation (DEPRECATED - use convert_v2 instead) Read more
Source§impl ResolveTargetSymbol for EnumConverter
impl ResolveTargetSymbol for EnumConverter
Source§fn resolve_target_symbol(
&self,
target: &MutationTargetSymbol,
ctx: &AnalysisContext,
) -> Result<SymbolId, ConvertError>
fn resolve_target_symbol( &self, target: &MutationTargetSymbol, ctx: &AnalysisContext, ) -> Result<SymbolId, ConvertError>
Resolve MutationTargetSymbol to SymbolId. Read more
Auto Trait Implementations§
impl Freeze for EnumConverter
impl RefUnwindSafe for EnumConverter
impl Send for EnumConverter
impl Sync for EnumConverter
impl Unpin for EnumConverter
impl UnsafeUnpin for EnumConverter
impl UnwindSafe for EnumConverter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 more