Skip to main content

Optionable

Trait Optionable 

Source
pub trait Optionable {
    type Optioned: ?Sized;
}
Expand description

Marker trait that associated this type with a corresponding type where potential inner sub-fields are recursively optional if possible for the given use case of the type. Implementations of the trait can decide that some fields are also non-optional for the optioned type.

In detail this means that an Option<T::Optioned> should allow for every combination of itself being set as well as just partial subfields of itself being set except for fields that are always required. Hence, for types without inner structure like i32 the Optioned type will resolve to itself, as e.g. Option<i32> already expresses the needed granularity.

Required Associated Types§

Source

type Optioned: ?Sized

The associated type where fields (if possible for the given use case) are recursively optional.

Implementations on Foreign Types§

Source§

impl Optionable for Value

Available on crate feature serde_json only.
Source§

impl Optionable for bool

Source§

impl Optionable for char

Source§

impl Optionable for f32

Source§

impl Optionable for f64

Source§

impl Optionable for i8

Source§

impl Optionable for i16

Source§

impl Optionable for i32

Source§

impl Optionable for i64

Source§

impl Optionable for i128

Source§

impl Optionable for isize

Source§

impl Optionable for str

Source§

impl Optionable for u8

Source§

impl Optionable for u16

Source§

impl Optionable for u32

Source§

impl Optionable for u64

Source§

impl Optionable for u128

Source§

impl Optionable for ()

Source§

impl Optionable for usize

Source§

impl Optionable for String

Available on crate features alloc or std only.
Source§

impl Optionable for Duration

Available on crate feature std only.
Source§

impl Optionable for OsStr

Available on crate feature std only.
Source§

impl Optionable for OsString

Available on crate feature std only.
Source§

impl Optionable for Path

Available on crate feature std only.
Source§

impl Optionable for PathBuf

Available on crate feature std only.
Source§

impl Optionable for Months

Available on crate feature chrono04 only.
Source§

impl Optionable for NaiveDate

Available on crate feature chrono04 only.
Source§

impl Optionable for NaiveDateTime

Available on crate feature chrono04 only.
Source§

impl Optionable for Days

Available on crate feature chrono04 only.
Source§

impl Optionable for NaiveTime

Available on crate feature chrono04 only.
Source§

impl Optionable for TimeDelta

Available on crate feature chrono04 only.
Source§

impl Optionable for SignedDuration

Available on crate feature jiff02 only.
Source§

impl Optionable for Span

Available on crate feature jiff02 only.
Source§

impl Optionable for SpanFieldwise

Available on crate feature jiff02 only.
Source§

impl Optionable for Timestamp

Available on crate feature jiff02 only.
Source§

impl Optionable for Zoned

Available on crate feature jiff02 only.
Source§

impl<'a, T: ?Sized + Optionable + ToOwned> Optionable for Cow<'a, T>
where T::Optioned: ToOwned,

Available on crate features alloc or std only.
Source§

impl<'a, T: ?Sized + Optionable> Optionable for &'a T

Source§

impl<'a, T: ?Sized + Optionable> Optionable for &'a mut T

Source§

type Optioned = &'a mut <T as Optionable>::Optioned

Source§

impl<K, T: Optionable> Optionable for BTreeMap<K, T>
where T::Optioned: Sized,

Available on crate features alloc or std only.
Source§

impl<K, T: Optionable, S> Optionable for HashMap<K, T, S>
where T::Optioned: Sized,

Available on crate feature std only.
Source§

impl<T0, T1> Optionable for (T0, T1)
where T0: Optionable, T0::Optioned: Sized, T1: Optionable, T1::Optioned: Sized,

Source§

impl<T0, T1, T2> Optionable for (T0, T1, T2)
where T0: Optionable, T0::Optioned: Sized, T1: Optionable, T1::Optioned: Sized, T2: Optionable, T2::Optioned: Sized,

Source§

impl<T0, T1, T2, T3> Optionable for (T0, T1, T2, T3)

Source§

impl<T0, T1, T2, T3, T4> Optionable for (T0, T1, T2, T3, T4)

Source§

impl<T0, T1, T2, T3, T4, T5> Optionable for (T0, T1, T2, T3, T4, T5)

Source§

impl<T0, T1, T2, T3, T4, T5, T6> Optionable for (T0, T1, T2, T3, T4, T5, T6)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> Optionable for (T0, T1, T2, T3, T4, T5, T6, T7)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> Optionable for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Optionable for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Optionable for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Optionable for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Optionable for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Optionable for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Optionable for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Optionable for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

Source§

impl<T: Optionable> Optionable for Option<T>
where T::Optioned: Sized,

Source§

impl<T: Optionable> Optionable for [T]
where T::Optioned: Sized,

Source§

impl<T: Optionable> Optionable for Box<T>

Available on crate features alloc or std only.
Source§

impl<T: Optionable> Optionable for BinaryHeap<T>
where T::Optioned: Sized,

Available on crate features alloc or std only.
Source§

impl<T: Optionable> Optionable for BTreeSet<T>
where T::Optioned: Sized,

Available on crate features alloc or std only.
Source§

impl<T: Optionable> Optionable for LinkedList<T>
where T::Optioned: Sized,

Available on crate features alloc or std only.
Source§

impl<T: Optionable> Optionable for VecDeque<T>
where T::Optioned: Sized,

Available on crate features alloc or std only.
Source§

impl<T: Optionable> Optionable for Rc<T>

Available on crate features alloc or std only.
Source§

impl<T: Optionable> Optionable for Weak<T>

Available on crate features alloc or std only.
Source§

impl<T: Optionable> Optionable for Arc<T>

Available on crate features alloc or std only.
Source§

impl<T: Optionable> Optionable for Weak<T>

Available on crate features alloc or std only.
Source§

impl<T: Optionable> Optionable for Vec<T>
where T::Optioned: Sized,

Available on crate features alloc or std only.
Source§

impl<T: Optionable> Optionable for Cell<T>

Source§

impl<T: Optionable> Optionable for RefCell<T>

Source§

impl<T: Optionable> Optionable for Mutex<T>

Available on crate feature std only.
Source§

impl<T: Optionable> Optionable for RwLock<T>

Available on crate feature std only.
Source§

impl<T: Optionable, E> Optionable for Result<T, E>
where T::Optioned: Sized,

Source§

impl<T: Optionable, S> Optionable for HashSet<T, S>
where T::Optioned: Sized,

Available on crate feature std only.
Source§

impl<T: Optionable, const N: usize> Optionable for [T; N]
where T::Optioned: Sized,

Source§

impl<Tz: TimeZone> Optionable for DateTime<Tz>

Available on crate feature chrono04 only.

Implementors§