pub struct FallbackTryDropStrategyHandler<FDS, FTDS>where
FDS: TryDropStrategy,
FTDS: FallibleTryDropStrategy,{
pub fallback_try_drop_strategy: FDS,
pub fallible_try_drop_strategy: FTDS,
}Expand description
A type which chains two try drop strategies together, one of which may fail and if so, will be redirected to the fallback, infallible try drop strategy.
This type implements TryDropStrategy because, as said before, any and all errors in the
fallible try drop strategy will be redirected to the fallback, which can never fail.
Fields§
§fallback_try_drop_strategy: FDSThe fallback try drop strategy. This will be called if the first try drop strategy fails and is a last resort to recovering sanely.
fallible_try_drop_strategy: FTDSThe try drop strategy which may fail. This will be called first.
Implementations§
Source§impl<FDS, FTDS> FallbackTryDropStrategyHandler<FDS, FTDS>where
FDS: TryDropStrategy,
FTDS: FallibleTryDropStrategy,
impl<FDS, FTDS> FallbackTryDropStrategyHandler<FDS, FTDS>where
FDS: TryDropStrategy,
FTDS: FallibleTryDropStrategy,
Trait Implementations§
Source§impl<FDS, FTDS> Clone for FallbackTryDropStrategyHandler<FDS, FTDS>
impl<FDS, FTDS> Clone for FallbackTryDropStrategyHandler<FDS, FTDS>
Source§fn clone(&self) -> FallbackTryDropStrategyHandler<FDS, FTDS>
fn clone(&self) -> FallbackTryDropStrategyHandler<FDS, FTDS>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<FDS, FTDS> Debug for FallbackTryDropStrategyHandler<FDS, FTDS>
impl<FDS, FTDS> Debug for FallbackTryDropStrategyHandler<FDS, FTDS>
Source§impl<FDS, FTDS> Default for FallbackTryDropStrategyHandler<FDS, FTDS>
impl<FDS, FTDS> Default for FallbackTryDropStrategyHandler<FDS, FTDS>
Source§fn default() -> FallbackTryDropStrategyHandler<FDS, FTDS>
fn default() -> FallbackTryDropStrategyHandler<FDS, FTDS>
Returns the “default value” for a type. Read more
Source§impl<FDS, FTDS> Hash for FallbackTryDropStrategyHandler<FDS, FTDS>
impl<FDS, FTDS> Hash for FallbackTryDropStrategyHandler<FDS, FTDS>
Source§impl<FDS, FTDS> Ord for FallbackTryDropStrategyHandler<FDS, FTDS>
impl<FDS, FTDS> Ord for FallbackTryDropStrategyHandler<FDS, FTDS>
Source§fn cmp(&self, other: &FallbackTryDropStrategyHandler<FDS, FTDS>) -> Ordering
fn cmp(&self, other: &FallbackTryDropStrategyHandler<FDS, FTDS>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<FDS, FTDS> PartialEq for FallbackTryDropStrategyHandler<FDS, FTDS>
impl<FDS, FTDS> PartialEq for FallbackTryDropStrategyHandler<FDS, FTDS>
Source§fn eq(&self, other: &FallbackTryDropStrategyHandler<FDS, FTDS>) -> bool
fn eq(&self, other: &FallbackTryDropStrategyHandler<FDS, FTDS>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<FDS, FTDS> PartialOrd for FallbackTryDropStrategyHandler<FDS, FTDS>
impl<FDS, FTDS> PartialOrd for FallbackTryDropStrategyHandler<FDS, FTDS>
Source§impl<FDS, FTDS> TryDropStrategy for FallbackTryDropStrategyHandler<FDS, FTDS>where
FDS: TryDropStrategy,
FTDS: FallibleTryDropStrategy,
impl<FDS, FTDS> TryDropStrategy for FallbackTryDropStrategyHandler<FDS, FTDS>where
FDS: TryDropStrategy,
FTDS: FallibleTryDropStrategy,
Source§fn handle_error(&self, error: Error)
fn handle_error(&self, error: Error)
Handle the drop error.
impl<FDS, FTDS> Copy for FallbackTryDropStrategyHandler<FDS, FTDS>
impl<FDS, FTDS> Eq for FallbackTryDropStrategyHandler<FDS, FTDS>
impl<FDS, FTDS> StructuralPartialEq for FallbackTryDropStrategyHandler<FDS, FTDS>where
FDS: TryDropStrategy,
FTDS: FallibleTryDropStrategy,
Auto Trait Implementations§
impl<FDS, FTDS> Freeze for FallbackTryDropStrategyHandler<FDS, FTDS>
impl<FDS, FTDS> RefUnwindSafe for FallbackTryDropStrategyHandler<FDS, FTDS>where
FDS: RefUnwindSafe,
FTDS: RefUnwindSafe,
impl<FDS, FTDS> Send for FallbackTryDropStrategyHandler<FDS, FTDS>
impl<FDS, FTDS> Sync for FallbackTryDropStrategyHandler<FDS, FTDS>
impl<FDS, FTDS> Unpin for FallbackTryDropStrategyHandler<FDS, FTDS>
impl<FDS, FTDS> UnwindSafe for FallbackTryDropStrategyHandler<FDS, FTDS>where
FDS: UnwindSafe,
FTDS: UnwindSafe,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DynFallibleTryDropStrategy for Twhere
T: FallibleTryDropStrategy,
impl<T> DynFallibleTryDropStrategy for Twhere
T: FallibleTryDropStrategy,
Source§impl<TDS> FallibleTryDropStrategy for TDSwhere
TDS: TryDropStrategy,
impl<TDS> FallibleTryDropStrategy for TDSwhere
TDS: TryDropStrategy,
Source§type Error = Infallible
type Error = Infallible
The type of the error that may occur when handling a drop error.
Source§fn try_handle_error(
&self,
error: Error,
) -> Result<(), <TDS as FallibleTryDropStrategy>::Error>
fn try_handle_error( &self, error: Error, ) -> Result<(), <TDS as FallibleTryDropStrategy>::Error>
Try and handle a drop error.