pub enum ChangeOrKeep<'o, T>where
    T: ToOwning<'o>,
{ Change(T), Keep(T::Owning), }
Expand description

An Idempotent implementation whose owning-ness is determined at runtime.

Variants§

§

Change(T)

A T that has not yet been transformed.

§

Keep(T::Owning)

A T::Owning which has already been transformed from a T.

Trait Implementations§

Get a reference to either a T or a T::Owning.
Get a mutable reference to either a T or a T::Owning.
Converts self into a T::Owning; equivalent to into_owning().0.
Converts an object which owns its contents into one which borrows them.
The resulting type after obtaining ownership of self’s contents.
Creates an object which owns its contents from one which borrows them.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.