pub enum ReferenceOr<T: Clone> {
Object(T),
Reference {
_ref: String,
},
}
Variants§
Implementations§
Source§impl<T: Clone> ReferenceOr<T>
impl<T: Clone> ReferenceOr<T>
pub fn get_object(self) -> Option<T>
pub fn get_object_mut(&mut self) -> Option<&mut T>
Trait Implementations§
Source§impl<T: Clone + Clone> Clone for ReferenceOr<T>
impl<T: Clone + Clone> Clone for ReferenceOr<T>
Source§fn clone(&self) -> ReferenceOr<T>
fn clone(&self) -> ReferenceOr<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<T> Freeze for ReferenceOr<T>where
T: Freeze,
impl<T> RefUnwindSafe for ReferenceOr<T>where
T: RefUnwindSafe,
impl<T> Send for ReferenceOr<T>where
T: Send,
impl<T> Sync for ReferenceOr<T>where
T: Sync,
impl<T> Unpin for ReferenceOr<T>where
T: Unpin,
impl<T> UnwindSafe for ReferenceOr<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