pub struct DynElement<'a, DB, Coord>where
DB: DrawingBackend,
Coord: Clone,{ /* private fields */ }
Expand description
The container for a dynamically dispatched element
Trait Implementations§
source§impl<'a, DB, Coord> Drawable<DB, BackendCoordOnly> for DynElement<'a, DB, Coord>where
DB: DrawingBackend,
Coord: Clone,
impl<'a, DB, Coord> Drawable<DB, BackendCoordOnly> for DynElement<'a, DB, Coord>where DB: DrawingBackend, Coord: Clone,
source§fn draw<I>(
&self,
pos: I,
backend: &mut DB,
parent_dim: (u32, u32)
) -> Result<(), DrawingErrorKind<<DB as DrawingBackend>::ErrorType>>where
I: Iterator<Item = (i32, i32)>,
fn draw<I>( &self, pos: I, backend: &mut DB, parent_dim: (u32, u32) ) -> Result<(), DrawingErrorKind<<DB as DrawingBackend>::ErrorType>>where I: Iterator<Item = (i32, i32)>,
Actually draws the element. The key points is already translated into the
image coordinate and can be used by DC directly
source§impl<'a, 'b, DB, Coord> PointCollection<'a, Coord, BackendCoordOnly> for &'a DynElement<'b, DB, Coord>where
'b: 'a,
DB: DrawingBackend,
Coord: Clone,
impl<'a, 'b, DB, Coord> PointCollection<'a, Coord, BackendCoordOnly> for &'a DynElement<'b, DB, Coord>where 'b: 'a, DB: DrawingBackend, Coord: Clone,
source§fn point_iter(
self
) -> <&'a DynElement<'b, DB, Coord> as PointCollection<'a, Coord, BackendCoordOnly>>::IntoIter
fn point_iter( self ) -> <&'a DynElement<'b, DB, Coord> as PointCollection<'a, Coord, BackendCoordOnly>>::IntoIter
framework to do the coordinate mapping
Auto Trait Implementations§
impl<'a, DB, Coord> !RefUnwindSafe for DynElement<'a, DB, Coord>
impl<'a, DB, Coord> !Send for DynElement<'a, DB, Coord>
impl<'a, DB, Coord> !Sync for DynElement<'a, DB, Coord>
impl<'a, DB, Coord> Unpin for DynElement<'a, DB, Coord>where Coord: Unpin,
impl<'a, DB, Coord> !UnwindSafe for DynElement<'a, 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<'b, T, DB, Coord> IntoDynElement<'b, DB, Coord> for Twhere
T: Drawable<DB, BackendCoordOnly> + 'b,
&'a T: for<'a> PointCollection<'a, Coord, BackendCoordOnly>,
Coord: Clone,
DB: DrawingBackend,
impl<'b, T, DB, Coord> IntoDynElement<'b, DB, Coord> for Twhere T: Drawable<DB, BackendCoordOnly> + 'b, &'a T: for<'a> PointCollection<'a, Coord, BackendCoordOnly>, Coord: Clone, DB: DrawingBackend,
source§fn into_dyn(self) -> DynElement<'b, DB, Coord>
fn into_dyn(self) -> DynElement<'b, DB, Coord>
Make the conversion