Enum red4ext_rs::types::Opt
source · pub enum Opt<T> {
NonDefault(T),
Default,
}
Expand description
A convenience type to explicitly mark
a function argument as opt T
.
When left unspecified on Redscript side,
it translates to its Default
representation.
Variants§
Implementations§
Trait Implementations§
source§impl<T> Ord for Opt<T>
impl<T> Ord for Opt<T>
source§impl<T> PartialEq for Opt<T>
impl<T> PartialEq for Opt<T>
source§impl<T> PartialOrd<T> for Opt<T>
impl<T> PartialOrd<T> for Opt<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<T> PartialOrd for Opt<T>
impl<T> PartialOrd for Opt<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy> Copy for Opt<T>
impl<T> Eq for Opt<T>
Auto Trait Implementations§
impl<T> Freeze for Opt<T>where
T: Freeze,
impl<T> RefUnwindSafe for Opt<T>where
T: RefUnwindSafe,
impl<T> Send for Opt<T>where
T: Send,
impl<T> Sync for Opt<T>where
T: Sync,
impl<T> Unpin for Opt<T>where
T: Unpin,
impl<T> UnwindSafe for Opt<T>where
T: UnwindSafe,
Blanket Implementations§
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