pub unsafe trait StructuralMutatorBase: Sized {
// Provided method
unsafe fn default_mutate<D>(
_this: *mut Self,
dispatch: &mut D,
value: MutationView<'_>,
mutator: &mut StructuralMutatorView<'_, D>,
) -> Result<UnchangedOr<Any>> { ... }
}Expand description
Default descent for a concrete structural-mutation Base.
§Safety
Self must start with StructuralMutatorObj at offset zero and preserve its engine-initialized header/vtable. Callbacks are synchronous and non-escaping; no reference to reentered Base state may span recursive calls. Project only fields needed for each operation, never borrow the whole Base or engine.
Provided Methods§
Sourceunsafe fn default_mutate<D>(
_this: *mut Self,
dispatch: &mut D,
value: MutationView<'_>,
mutator: &mut StructuralMutatorView<'_, D>,
) -> Result<UnchangedOr<Any>>
unsafe fn default_mutate<D>( _this: *mut Self, dispatch: &mut D, value: MutationView<'_>, mutator: &mut StructuralMutatorView<'_, D>, ) -> Result<UnchangedOr<Any>>
Delegate to StructuralMutatorObj::default_mutate for built-in descent.
§Safety
this is the live Base of mutator, valid only during this synchronous call.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.