pub trait ConstDefault {
const DEFAULT: Self;
}
Expand description
A trait for giving a type a useful default value in compile-time.
Required Associated Constants§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl ConstDefault for &mut str
Available on crate feature unsafe_str
only.
impl ConstDefault for &mut str
Available on crate feature
unsafe_str
only.Source§impl<T: ConstDefault> ConstDefault for [T; 0]
impl<T: ConstDefault> ConstDefault for [T; 0]
Source§impl<T: ConstDefault> ConstDefault for [T; 1]
impl<T: ConstDefault> ConstDefault for [T; 1]
Source§impl<T: ConstDefault> ConstDefault for [T; 2]
impl<T: ConstDefault> ConstDefault for [T; 2]
Source§impl<T: ConstDefault> ConstDefault for [T; 3]
impl<T: ConstDefault> ConstDefault for [T; 3]
Source§impl<T: ConstDefault> ConstDefault for [T; 4]
impl<T: ConstDefault> ConstDefault for [T; 4]
Source§impl<T: ConstDefault> ConstDefault for [T; 5]
impl<T: ConstDefault> ConstDefault for [T; 5]
Source§impl<T: ConstDefault> ConstDefault for [T; 6]
impl<T: ConstDefault> ConstDefault for [T; 6]
Source§impl<T: ConstDefault> ConstDefault for [T; 7]
impl<T: ConstDefault> ConstDefault for [T; 7]
Source§impl<T: ConstDefault> ConstDefault for [T; 8]
impl<T: ConstDefault> ConstDefault for [T; 8]
Source§impl<T: ConstDefault> ConstDefault for [T; 9]
impl<T: ConstDefault> ConstDefault for [T; 9]
Source§impl<T: ConstDefault> ConstDefault for [T; 10]
impl<T: ConstDefault> ConstDefault for [T; 10]
Source§impl<T: ConstDefault> ConstDefault for [T; 11]
impl<T: ConstDefault> ConstDefault for [T; 11]
Source§impl<T: ConstDefault> ConstDefault for [T; 12]
impl<T: ConstDefault> ConstDefault for [T; 12]
Source§impl<T: ConstDefault> ConstDefault for [T; 13]
impl<T: ConstDefault> ConstDefault for [T; 13]
Source§impl<T: ConstDefault> ConstDefault for [T; 14]
impl<T: ConstDefault> ConstDefault for [T; 14]
Source§impl<T: ConstDefault> ConstDefault for [T; 15]
impl<T: ConstDefault> ConstDefault for [T; 15]
Source§impl<T: ConstDefault> ConstDefault for [T; 16]
impl<T: ConstDefault> ConstDefault for [T; 16]
Source§impl<T: ConstDefault> ConstDefault for [T; 17]
impl<T: ConstDefault> ConstDefault for [T; 17]
Source§impl<T: ConstDefault> ConstDefault for [T; 18]
impl<T: ConstDefault> ConstDefault for [T; 18]
Source§impl<T: ConstDefault> ConstDefault for [T; 19]
impl<T: ConstDefault> ConstDefault for [T; 19]
Source§impl<T: ConstDefault> ConstDefault for [T; 20]
impl<T: ConstDefault> ConstDefault for [T; 20]
Source§impl<T: ConstDefault> ConstDefault for [T; 21]
impl<T: ConstDefault> ConstDefault for [T; 21]
Source§impl<T: ConstDefault> ConstDefault for [T; 22]
impl<T: ConstDefault> ConstDefault for [T; 22]
Source§impl<T: ConstDefault> ConstDefault for [T; 23]
impl<T: ConstDefault> ConstDefault for [T; 23]
Source§impl<T: ConstDefault> ConstDefault for [T; 24]
impl<T: ConstDefault> ConstDefault for [T; 24]
Source§impl<T: ConstDefault> ConstDefault for [T; 25]
impl<T: ConstDefault> ConstDefault for [T; 25]
Source§impl<T: ConstDefault> ConstDefault for [T; 26]
impl<T: ConstDefault> ConstDefault for [T; 26]
Source§impl<T: ConstDefault> ConstDefault for [T; 27]
impl<T: ConstDefault> ConstDefault for [T; 27]
Source§impl<T: ConstDefault> ConstDefault for [T; 28]
impl<T: ConstDefault> ConstDefault for [T; 28]
Source§impl<T: ConstDefault> ConstDefault for [T; 29]
impl<T: ConstDefault> ConstDefault for [T; 29]
Source§impl<T: ConstDefault> ConstDefault for [T; 30]
impl<T: ConstDefault> ConstDefault for [T; 30]
Source§impl<T: ConstDefault> ConstDefault for [T; 31]
impl<T: ConstDefault> ConstDefault for [T; 31]
Source§impl<T: ConstDefault> ConstDefault for [T; 32]
impl<T: ConstDefault> ConstDefault for [T; 32]
Source§impl<T: ConstDefault> ConstDefault for (T, T)
impl<T: ConstDefault> ConstDefault for (T, T)
Source§impl<T: ConstDefault> ConstDefault for (T, T, T)
impl<T: ConstDefault> ConstDefault for (T, T, T)
Source§impl<T: ConstDefault> ConstDefault for (T, T, T, T)
impl<T: ConstDefault> ConstDefault for (T, T, T, T)
Source§impl<T: ConstDefault> ConstDefault for (T, T, T, T, T)
impl<T: ConstDefault> ConstDefault for (T, T, T, T, T)
Source§impl<T: ConstDefault> ConstDefault for (T, T, T, T, T, T)
impl<T: ConstDefault> ConstDefault for (T, T, T, T, T, T)
Source§impl<T: ConstDefault> ConstDefault for (T, T, T, T, T, T, T)
impl<T: ConstDefault> ConstDefault for (T, T, T, T, T, T, T)
Source§impl<T: ConstDefault> ConstDefault for (T, T, T, T, T, T, T, T)
impl<T: ConstDefault> ConstDefault for (T, T, T, T, T, T, T, T)
Source§impl<T: ConstDefault> ConstDefault for (T, T, T, T, T, T, T, T, T)
impl<T: ConstDefault> ConstDefault for (T, T, T, T, T, T, T, T, T)
Source§impl<T: ConstDefault> ConstDefault for (T,)
impl<T: ConstDefault> ConstDefault for (T,)
Implementors§
Source§impl ConstDefault for ExitCode
Available on crate feature std
only.
impl ConstDefault for ExitCode
Available on crate feature
std
only.Source§impl ConstDefault for AtomicI128
impl ConstDefault for AtomicI128
Source§impl ConstDefault for AtomicIsize
impl ConstDefault for AtomicIsize
Source§impl ConstDefault for AtomicU128
impl ConstDefault for AtomicU128
Source§impl ConstDefault for AtomicUsize
impl ConstDefault for AtomicUsize
Source§impl ConstDefault for Boxed
Available on crate feature alloc
only.
impl ConstDefault for Boxed
Available on crate feature
alloc
only.Source§impl ConstDefault for HasherPengy
impl ConstDefault for HasherPengy
Source§impl ConstDefault for PhantomPinned
impl ConstDefault for PhantomPinned
Source§impl ConstDefault for XorShift8
Available on crate feature rand
only.
impl ConstDefault for XorShift8
Available on crate feature
rand
only.Source§impl ConstDefault for XorShift16
Available on crate feature rand
only.
impl ConstDefault for XorShift16
Available on crate feature
rand
only.Source§impl ConstDefault for XorShift32
Available on crate feature rand
only.
impl ConstDefault for XorShift32
Available on crate feature
rand
only.Source§impl ConstDefault for XorShift64
Available on crate feature rand
only.
impl ConstDefault for XorShift64
Available on crate feature
rand
only.Source§impl ConstDefault for XorShift128
Available on crate feature rand
only.
impl ConstDefault for XorShift128
Available on crate feature
rand
only.Source§impl ConstDefault for XorShift128p
Available on crate feature rand
only.
impl ConstDefault for XorShift128p
Available on crate feature
rand
only.Source§impl ConstDefault for Xoroshiro128pp
Available on crate feature rand
only.
impl ConstDefault for Xoroshiro128pp
Available on crate feature
rand
only.Source§impl ConstDefault for devela::_info::examples::niche::NonExtremeI8
Available on doc
only.
impl ConstDefault for devela::_info::examples::niche::NonExtremeI8
Available on
doc
only.Source§impl ConstDefault for devela::all::NonExtremeI8
impl ConstDefault for devela::all::NonExtremeI8
Source§impl ConstDefault for NonExtremeU8
impl ConstDefault for NonExtremeU8
Source§impl ConstDefault for NonExtremeU16
impl ConstDefault for NonExtremeU16
Source§impl<N: ConstDefault, H: ConstDefault> ConstDefault for Mismatch<N, H>
impl<N: ConstDefault, H: ConstDefault> ConstDefault for Mismatch<N, H>
Source§impl<S: ConstDefault, V: ConstDefault> ConstDefault for Own<S, V>
impl<S: ConstDefault, V: ConstDefault> ConstDefault for Own<S, V>
Source§impl<T> ConstDefault for Interval<T>
Provides a const default value for Interval
, the unbounded interval $(-\infty, \infty)$.
impl<T> ConstDefault for Interval<T>
Provides a const default value for Interval
, the unbounded interval $(-\infty, \infty)$.
Source§impl<T> ConstDefault for LinkedList<T>
impl<T> ConstDefault for LinkedList<T>
Source§impl<T> ConstDefault for PhantomData<T>
impl<T> ConstDefault for PhantomData<T>
Source§impl<T> ConstDefault for TypeResource<T>
impl<T> ConstDefault for TypeResource<T>
Source§impl<T: ConstDefault> ConstDefault for Option<T>
impl<T: ConstDefault> ConstDefault for Option<T>
Source§impl<T: ConstDefault> ConstDefault for LazyLock<T>
Available on crate feature std
only.
impl<T: ConstDefault> ConstDefault for LazyLock<T>
Available on crate feature
std
only.Source§impl<T: ConstDefault> ConstDefault for Cast<T>
Available on prim···
only.
impl<T: ConstDefault> ConstDefault for Cast<T>
Available on
prim···
only.Source§impl<T: ConstDefault> ConstDefault for Reverse<T>
impl<T: ConstDefault> ConstDefault for Reverse<T>
Source§impl<T: ConstDefault> ConstDefault for Weak<T>
Available on crate feature std
only.
impl<T: ConstDefault> ConstDefault for Weak<T>
Available on crate feature
std
only.Source§impl<T: ConstDefault> ConstDefault for Atomic<T>
impl<T: ConstDefault> ConstDefault for Atomic<T>
Source§impl<T: ConstDefault> ConstDefault for Mutex<T>
Available on crate feature std
only.
impl<T: ConstDefault> ConstDefault for Mutex<T>
Available on crate feature
std
only.Source§impl<T: ConstDefault> ConstDefault for OnceLock<T>
Available on crate feature std
only.
impl<T: ConstDefault> ConstDefault for OnceLock<T>
Available on crate feature
std
only.Source§impl<T: ConstDefault> ConstDefault for RwLock<T>
Available on crate feature std
only.
impl<T: ConstDefault> ConstDefault for RwLock<T>
Available on crate feature
std
only.Source§impl<T: ConstDefault> ConstDefault for Angle<T>
Available on crate feature geom
only.
impl<T: ConstDefault> ConstDefault for Angle<T>
Available on crate feature
geom
only.Source§impl<T: ConstDefault> ConstDefault for BareBox<T>
impl<T: ConstDefault> ConstDefault for BareBox<T>
Source§impl<T: ConstDefault> ConstDefault for Cell<T>
impl<T: ConstDefault> ConstDefault for Cell<T>
Source§impl<T: ConstDefault> ConstDefault for LazyCell<T>
Available on crate feature std
only.
impl<T: ConstDefault> ConstDefault for LazyCell<T>
Available on crate feature
std
only.Source§impl<T: ConstDefault> ConstDefault for ManuallyDrop<T>
impl<T: ConstDefault> ConstDefault for ManuallyDrop<T>
Source§impl<T: ConstDefault> ConstDefault for OnceCell<T>
impl<T: ConstDefault> ConstDefault for OnceCell<T>
Source§impl<T: ConstDefault> ConstDefault for AssertUnwindSafe<T>
impl<T: ConstDefault> ConstDefault for AssertUnwindSafe<T>
Source§impl<T: ConstDefault> ConstDefault for Range<T>
impl<T: ConstDefault> ConstDefault for Range<T>
Source§impl<T: ConstDefault> ConstDefault for RangeFrom<T>
impl<T: ConstDefault> ConstDefault for RangeFrom<T>
Source§impl<T: ConstDefault> ConstDefault for RangeInclusive<T>
impl<T: ConstDefault> ConstDefault for RangeInclusive<T>
Source§impl<T: ConstDefault> ConstDefault for RangeTo<T>
impl<T: ConstDefault> ConstDefault for RangeTo<T>
Source§impl<T: ConstDefault> ConstDefault for RangeToInclusive<T>
impl<T: ConstDefault> ConstDefault for RangeToInclusive<T>
Source§impl<T: ConstDefault> ConstDefault for RcWeak<T>
impl<T: ConstDefault> ConstDefault for RcWeak<T>
Source§impl<T: ConstDefault> ConstDefault for RefCell<T>
impl<T: ConstDefault> ConstDefault for RefCell<T>
Source§impl<T: ConstDefault> ConstDefault for Saturating<T>
impl<T: ConstDefault> ConstDefault for Saturating<T>
Source§impl<T: ConstDefault> ConstDefault for UnsafeCell<T>
impl<T: ConstDefault> ConstDefault for UnsafeCell<T>
Source§impl<T: ConstDefault> ConstDefault for Wrapping<T>
impl<T: ConstDefault> ConstDefault for Wrapping<T>
Source§impl<T: ConstDefault, const C: usize, const R: usize, const CR: usize, const RMAJ: bool> ConstDefault for Array2d<T, C, R, CR, RMAJ, Bare>
impl<T: ConstDefault, const C: usize, const R: usize, const CR: usize, const RMAJ: bool> ConstDefault for Array2d<T, C, R, CR, RMAJ, Bare>
Source§impl<T: ConstDefault, const CAP: usize> ConstDefault for Array<T, CAP, Bare>
impl<T: ConstDefault, const CAP: usize> ConstDefault for Array<T, CAP, Bare>
Source§impl<T: ConstDefault, const CAP: usize, IDX: ConstDefault> ConstDefault for Destaque<T, CAP, IDX, Bare>
impl<T: ConstDefault, const CAP: usize, IDX: ConstDefault> ConstDefault for Destaque<T, CAP, IDX, Bare>
Source§impl<T: ConstDefault, const CAP: usize, IDX: ConstDefault> ConstDefault for Stack<T, CAP, IDX, Bare>
impl<T: ConstDefault, const CAP: usize, IDX: ConstDefault> ConstDefault for Stack<T, CAP, IDX, Bare>
Source§impl<T: ConstDefault, const D: usize> ConstDefault for Extent<T, D>
Available on crate feature geom
only.
impl<T: ConstDefault, const D: usize> ConstDefault for Extent<T, D>
Available on crate feature
geom
only.Source§impl<T: ConstDefault, const D: usize> ConstDefault for Point<T, D>
Available on crate feature geom
only.
impl<T: ConstDefault, const D: usize> ConstDefault for Point<T, D>
Available on crate feature
geom
only.Source§impl<T: ConstDefault, const D: usize> ConstDefault for Vector<T, D>
Available on crate feature alg
only.
impl<T: ConstDefault, const D: usize> ConstDefault for Vector<T, D>
Available on crate feature
alg
only.Source§impl<T: MemPod, const CAP: usize> ConstDefault for DstArray<T, CAP>
Available on crate feature unsafe_layout
only.
impl<T: MemPod, const CAP: usize> ConstDefault for DstArray<T, CAP>
Available on crate feature
unsafe_layout
only.Source§impl<const CAP: usize> ConstDefault for GraphemeNonul<CAP>
impl<const CAP: usize> ConstDefault for GraphemeNonul<CAP>
Source§impl<const CAP: usize> ConstDefault for GraphemeU8<CAP>
impl<const CAP: usize> ConstDefault for GraphemeU8<CAP>
Source§impl<const CAP: usize> ConstDefault for StringNonul<CAP>
Available on crate feature _string_nonul
only.
impl<const CAP: usize> ConstDefault for StringNonul<CAP>
Available on crate feature
_string_nonul
only.Source§impl<const CAP: usize> ConstDefault for StringUsize<CAP>
impl<const CAP: usize> ConstDefault for StringUsize<CAP>
Source§impl<const SH1: usize, const SH2: usize, const SH3: usize> ConstDefault for XorShift8Custom<SH1, SH2, SH3>
Available on crate feature rand
only.
impl<const SH1: usize, const SH2: usize, const SH3: usize> ConstDefault for XorShift8Custom<SH1, SH2, SH3>
Available on crate feature
rand
only.