pub struct MethodConverter;Expand description
Converter for Method mutations (AddMethod, RemoveMethod)
Implementations§
Trait Implementations§
Source§impl Clone for MethodConverter
impl Clone for MethodConverter
Source§fn clone(&self) -> MethodConverter
fn clone(&self) -> MethodConverter
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 MethodConverter
impl Debug for MethodConverter
Source§impl Default for MethodConverter
impl Default for MethodConverter
Source§fn default() -> MethodConverter
fn default() -> MethodConverter
Returns the “default value” for a type. Read more
Source§impl MutationConverter for MethodConverter
impl MutationConverter for MethodConverter
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 MethodConverter
impl ResolveTargetSymbol for MethodConverter
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 MethodConverter
impl RefUnwindSafe for MethodConverter
impl Send for MethodConverter
impl Sync for MethodConverter
impl Unpin for MethodConverter
impl UnsafeUnpin for MethodConverter
impl UnwindSafe for MethodConverter
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