pub struct Mutator { /* private fields */ }Expand description
Recursion control passed to a typed #[dispatch(mutate)] handler.
The dispatch object owns all pass state. Recursive operations take that
object explicitly so Rust can safely reborrow the same &mut self for the
child call.
Implementations§
Source§impl Mutator
impl Mutator
Sourcepub fn def_region_kind(&self) -> DefRegionKind
pub fn def_region_kind(&self) -> DefRegionKind
Definition-region state active at the callback’s current value.
Sourcepub fn region(&self) -> DefRegionKind
pub fn region(&self) -> DefRegionKind
Definition region active at the callback’s current value.
Sourcepub fn mutate<D, T>(&mut self, dispatch: &mut D, value: &T) -> Result<Any>
pub fn mutate<D, T>(&mut self, dispatch: &mut D, value: &T) -> Result<Any>
Mutate a borrowed child through the same typed dispatch object.
Sourcepub fn mutate_with<D, T>(
&mut self,
dispatch: &mut D,
value: &T,
def_region_kind: DefRegionKind,
) -> Result<Any>
pub fn mutate_with<D, T>( &mut self, dispatch: &mut D, value: &T, def_region_kind: DefRegionKind, ) -> Result<Any>
Mutate a borrowed child under an explicit definition-region state.
Sourcepub fn maybe_inplace_mutate<D, T>(
&mut self,
dispatch: &mut D,
value: T,
) -> Result<Any>
pub fn maybe_inplace_mutate<D, T>( &mut self, dispatch: &mut D, value: T, ) -> Result<Any>
Mutate an owned child and permit reuse when it remains uniquely owned.
Sourcepub fn maybe_inplace_mutate_with<D, T>(
&mut self,
dispatch: &mut D,
value: T,
def_region_kind: DefRegionKind,
) -> Result<Any>
pub fn maybe_inplace_mutate_with<D, T>( &mut self, dispatch: &mut D, value: T, def_region_kind: DefRegionKind, ) -> Result<Any>
Mutate an owned child under an explicit definition-region state.
Sourcepub fn default_mutate<D: MutateDispatch>(
&mut self,
dispatch: &mut D,
) -> Result<Any>
pub fn default_mutate<D: MutateDispatch>( &mut self, dispatch: &mut D, ) -> Result<Any>
Apply default mutation to the callback’s current value.
Sourcepub fn mutate_result<D, T>(
&mut self,
dispatch: &mut D,
value: &T,
) -> Result<UnchangedOr<Any>>
pub fn mutate_result<D, T>( &mut self, dispatch: &mut D, value: &T, ) -> Result<UnchangedOr<Any>>
Mutate a borrowed child while preserving an unchanged result.
Sourcepub fn mutate_with_result<D, T>(
&mut self,
dispatch: &mut D,
value: &T,
kind: DefRegionKind,
) -> Result<UnchangedOr<Any>>
pub fn mutate_with_result<D, T>( &mut self, dispatch: &mut D, value: &T, kind: DefRegionKind, ) -> Result<UnchangedOr<Any>>
Mutate a borrowed child under an explicit region, preserving unchanged.
Sourcepub fn default_mutate_result<D: MutateDispatch>(
&mut self,
dispatch: &mut D,
) -> Result<UnchangedOr<Any>>
pub fn default_mutate_result<D: MutateDispatch>( &mut self, dispatch: &mut D, ) -> Result<UnchangedOr<Any>>
Apply default mutation without materializing an unchanged original.
Sourcepub fn var_remap_get<D: MutateDispatch>(
&mut self,
dispatch: &mut D,
var: &MapValue,
) -> Result<Option<Any>>
pub fn var_remap_get<D: MutateDispatch>( &mut self, dispatch: &mut D, var: &MapValue, ) -> Result<Option<Any>>
Look up an invocation-local identity substitution.
Sourcepub fn var_remap_set<D: MutateDispatch>(
&mut self,
dispatch: &mut D,
var: &MapValue,
mutated_value: &Any,
) -> Result<()>
pub fn var_remap_set<D: MutateDispatch>( &mut self, dispatch: &mut D, var: &MapValue, mutated_value: &Any, ) -> Result<()>
Store an invocation-local identity substitution.