pub struct DynElement<DB, Coord>where
DB: DrawingBackend,
Coord: Clone,{ /* private fields */ }Expand description
The container for a dynamically dispatched element
Trait Implementations§
Source§impl<DB: DrawingBackend, Coord: Clone> Drawable<DB> for DynElement<DB, Coord>
impl<DB: DrawingBackend, Coord: Clone> Drawable<DB> for DynElement<DB, Coord>
Source§fn draw<I: Iterator<Item = BackendCoord>>(
&self,
pos: I,
backend: &mut DB,
) -> Result<(), DrawingErrorKind<DB::ErrorType>>
fn draw<I: Iterator<Item = BackendCoord>>( &self, pos: I, backend: &mut DB, ) -> Result<(), DrawingErrorKind<DB::ErrorType>>
Actually draws the element. The key points is already translated into the
image cooridnate and can be used by DC directly
Source§impl<'a, DB: DrawingBackend, Coord: Clone> PointCollection<'a, Coord> for &'a DynElement<DB, Coord>
impl<'a, DB: DrawingBackend, Coord: Clone> PointCollection<'a, Coord> for &'a DynElement<DB, Coord>
Auto Trait Implementations§
impl<DB, Coord> Freeze for DynElement<DB, Coord>
impl<DB, Coord> !RefUnwindSafe for DynElement<DB, Coord>
impl<DB, Coord> !Send for DynElement<DB, Coord>
impl<DB, Coord> !Sync for DynElement<DB, Coord>
impl<DB, Coord> Unpin for DynElement<DB, Coord>where
Coord: Unpin,
impl<DB, Coord> !UnwindSafe for DynElement<DB, Coord>
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
Source§impl<T, DB, Coord> IntoDynElement<DB, Coord> for Twhere
T: Drawable<DB> + 'static,
&'a T: for<'a> PointCollection<'a, Coord>,
Coord: Clone,
DB: DrawingBackend,
impl<T, DB, Coord> IntoDynElement<DB, Coord> for Twhere
T: Drawable<DB> + 'static,
&'a T: for<'a> PointCollection<'a, Coord>,
Coord: Clone,
DB: DrawingBackend,
Source§fn into_dyn(self) -> DynElement<DB, Coord>
fn into_dyn(self) -> DynElement<DB, Coord>
Make the conversion
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more