pub struct CascadeStrategy {
pub derive: DeriveStrategy,
pub match_update: MatchUpdateStrategy,
pub field_init: FieldInitStrategy,
pub reference_update: ReferenceUpdateStrategy,
pub removal: RemovalStrategy,
pub on_error: ErrorStrategy,
}Expand description
Unified cascade strategy combining all individual strategies.
Fields§
§derive: DeriveStrategyStrategy for derive operations.
match_update: MatchUpdateStrategyStrategy for match expression updates.
field_init: FieldInitStrategyStrategy for field initialization.
reference_update: ReferenceUpdateStrategyStrategy for reference updates.
removal: RemovalStrategyStrategy for removal operations.
on_error: ErrorStrategyStrategy for error handling.
Implementations§
Source§impl CascadeStrategy
impl CascadeStrategy
Sourcepub fn safe() -> Self
pub fn safe() -> Self
Create a safe strategy that prioritizes data protection.
- Deprecates before removing
- Stops on errors
- Reports rather than modifies for dangerous operations
Sourcepub fn aggressive() -> Self
pub fn aggressive() -> Self
Create an aggressive strategy that prioritizes automation.
- Removes references directly
- Continues past errors
- Applies changes automatically
Sourcepub fn interactive() -> Self
pub fn interactive() -> Self
Create an interactive strategy that prompts for decisions.
Trait Implementations§
Source§impl Clone for CascadeStrategy
impl Clone for CascadeStrategy
Source§fn clone(&self) -> CascadeStrategy
fn clone(&self) -> CascadeStrategy
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 CascadeStrategy
impl Debug for CascadeStrategy
Source§impl Default for CascadeStrategy
impl Default for CascadeStrategy
Source§fn default() -> CascadeStrategy
fn default() -> CascadeStrategy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CascadeStrategy
impl RefUnwindSafe for CascadeStrategy
impl Send for CascadeStrategy
impl Sync for CascadeStrategy
impl Unpin for CascadeStrategy
impl UnsafeUnpin for CascadeStrategy
impl UnwindSafe for CascadeStrategy
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> 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