rstd 0.1.0
Loading...
Searching...
No Matches
rstd::option::Option< T > Class Template Referenceexport
module rstd.core

An optional value: either Some containing a value, or None. More...

Public Member Functions

auto clone () const -> Option
 Creates a deep copy of this option and its contained value.
 
void clone_from (Option &source)
 Overwrites this option with a clone of the source.
 

Detailed Description

template<typename T>
class rstd::option::Option< T >

An optional value: either Some containing a value, or None.

An optional value: either Some(T) or None.

Template Parameters
TThe type of the contained value.

Member Function Documentation

◆ clone()

template<typename T >
auto rstd::option::Option< T >::clone ( ) const -> Option
inline

Creates a deep copy of this option and its contained value.

Returns
A new Option with a cloned value, or None.

◆ clone_from()

template<typename T >
void rstd::option::Option< T >::clone_from ( Option< T > & source)
inline

Overwrites this option with a clone of the source.

Parameters
sourceThe option to clone from.

The documentation for this class was generated from the following file: