pub enum ElementOrVirtual<'a, Element: Clone> {
Element(&'a Element),
VirtualElement(Box<dyn VirtualElement<Element>>),
}
Variants§
Element(&'a Element)
VirtualElement(Box<dyn VirtualElement<Element>>)
Implementations§
Trait Implementations§
source§impl<'a, Element: Clone + Clone> Clone for ElementOrVirtual<'a, Element>
impl<'a, Element: Clone + Clone> Clone for ElementOrVirtual<'a, Element>
source§fn clone(&self) -> ElementOrVirtual<'a, Element>
fn clone(&self) -> ElementOrVirtual<'a, Element>
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 moresource§impl<'a, Element: Clone> From<&'a Element> for ElementOrVirtual<'a, Element>
impl<'a, Element: Clone> From<&'a Element> for ElementOrVirtual<'a, Element>
source§fn from(value: &'a Element) -> Self
fn from(value: &'a Element) -> Self
Converts to this type from the input type.
source§impl<'a, Element: Clone> From<&'a OwnedElementOrVirtual<Element>> for ElementOrVirtual<'a, Element>
impl<'a, Element: Clone> From<&'a OwnedElementOrVirtual<Element>> for ElementOrVirtual<'a, Element>
source§fn from(value: &'a OwnedElementOrVirtual<Element>) -> Self
fn from(value: &'a OwnedElementOrVirtual<Element>) -> Self
Converts to this type from the input type.
source§impl<'a, Element: Clone> From<Box<dyn VirtualElement<Element>>> for ElementOrVirtual<'a, Element>
impl<'a, Element: Clone> From<Box<dyn VirtualElement<Element>>> for ElementOrVirtual<'a, Element>
source§fn from(value: Box<dyn VirtualElement<Element>>) -> Self
fn from(value: Box<dyn VirtualElement<Element>>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a, Element> Freeze for ElementOrVirtual<'a, Element>
impl<'a, Element> !RefUnwindSafe for ElementOrVirtual<'a, Element>
impl<'a, Element> !Send for ElementOrVirtual<'a, Element>
impl<'a, Element> !Sync for ElementOrVirtual<'a, Element>
impl<'a, Element> Unpin for ElementOrVirtual<'a, Element>
impl<'a, Element> !UnwindSafe for ElementOrVirtual<'a, Element>
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