Struct former::exposed::ReturnStorage
source · pub struct ReturnStorage;
Expand description
A FormingEnd
implementation that returns the storage itself as the formed entity, disregarding any contextual data.
This struct is suited for straightforward forming processes where the storage already represents the final state of the entity, and no additional processing or transformation of the storage is required. It simplifies use cases where the storage does not undergo a transformation into a different type at the end of the forming process.
Trait Implementations§
source§impl Debug for ReturnStorage
impl Debug for ReturnStorage
source§impl Default for ReturnStorage
impl Default for ReturnStorage
source§fn default() -> ReturnStorage
fn default() -> ReturnStorage
Returns the “default value” for a type. Read more
source§impl<Definition, T> FormingEnd<Definition> for ReturnStoragewhere
Definition: FormerDefinitionTypes<Context = (), Storage = T, Formed = T>,
impl<Definition, T> FormingEnd<Definition> for ReturnStoragewhere
Definition: FormerDefinitionTypes<Context = (), Storage = T, Formed = T>,
source§fn call(
&self,
storage: <Definition as FormerDefinitionTypes>::Storage,
_context: Option<()>,
) -> <Definition as FormerDefinitionTypes>::Formed
fn call( &self, storage: <Definition as FormerDefinitionTypes>::Storage, _context: Option<()>, ) -> <Definition as FormerDefinitionTypes>::Formed
Returns the storage as the final product of the forming process, ignoring any additional context.
Auto Trait Implementations§
impl Freeze for ReturnStorage
impl RefUnwindSafe for ReturnStorage
impl Send for ReturnStorage
impl Sync for ReturnStorage
impl Unpin for ReturnStorage
impl UnwindSafe for ReturnStorage
Blanket Implementations§
source§impl<S> AssignWithType for S
impl<S> AssignWithType for S
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<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
§type Val = <C as Collection>::Val
type Val = <C as Collection>::Val
The type of values stored in the collection. This might be distinct from
Entry
in complex collections.
For example, in a HashMap
, while Entry
might be a ( key, value ) tuple, Val
might only be the value part.source§fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
Converts an entry into a value representation specific to the type of collection. This conversion is crucial
for handling operations on entries, especially when they need to be treated or accessed as individual values,
such as retrieving the value part from a key-value pair in a hash map.
source§impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
source§fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
Invokes the val_to_entry
function of the CollectionValToEntry
trait to convert the value to an entry.
§type Entry = <C as CollectionValToEntry<Val>>::Entry
type Entry = <C as CollectionValToEntry<Val>>::Entry
Represents the type of entry that corresponds to the value within the collection.