Struct gemini_engine::elements::containers::VisibilityToggle
source · pub struct VisibilityToggle<E: ViewElement> {
pub element: E,
pub visible: bool,
}Expand description
VisibilityToggle is a container for a ViewElement with a property visible. When blit to the view the contained element will only appear if visible is true
Fields§
§element: EThe element held by the VisibilityToggle. Must implement ViewElement
visible: boolWhether the element is visible
Implementations§
source§impl<E: ViewElement> VisibilityToggle<E>
impl<E: ViewElement> VisibilityToggle<E>
Trait Implementations§
source§impl<E: Clone + ViewElement> Clone for VisibilityToggle<E>
impl<E: Clone + ViewElement> Clone for VisibilityToggle<E>
source§fn clone(&self) -> VisibilityToggle<E>
fn clone(&self) -> VisibilityToggle<E>
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<E: Debug + ViewElement> Debug for VisibilityToggle<E>
impl<E: Debug + ViewElement> Debug for VisibilityToggle<E>
source§impl<T: ViewElement> ViewElement for VisibilityToggle<T>
impl<T: ViewElement> ViewElement for VisibilityToggle<T>
source§fn active_pixels(&self) -> Vec<Pixel>
fn active_pixels(&self) -> Vec<Pixel>
Return a vector of every coordinate where a pixel should be placed and its respective
ColChar. If your whole object is a solid colour, consider using utils::points_to_pixels() which will add the same ColChar to every point and can then be used as this function’s outputAuto Trait Implementations§
impl<E> RefUnwindSafe for VisibilityToggle<E>where E: RefUnwindSafe,
impl<E> Send for VisibilityToggle<E>where E: Send,
impl<E> Sync for VisibilityToggle<E>where E: Sync,
impl<E> Unpin for VisibilityToggle<E>where E: Unpin,
impl<E> UnwindSafe for VisibilityToggle<E>where E: 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