Expand description
A wrapper around a Drawable with KnownSize, giving it a margin on all sides
Fields
margin: (u32, u32, u32, u32)
The margin: (top, right, bottom, left)
inner: T
The thing to be marginalized
Implementations
Trait Implementations
sourceimpl<T: Drawable + KnownSize> Drawable for Margin<T>
impl<T: Drawable + KnownSize> Drawable for Margin<T>
sourcefn content_mut(&mut self) -> Vec<&mut dyn Drawable>
fn content_mut(&mut self) -> Vec<&mut dyn Drawable>
What this object contains, mutably
sourcefn step(&mut self)
fn step(&mut self)
When the user presses space, the state of the presentation is advanced. This
method is what is called. Read more
sourcefn draw(&self, canvas: &mut Canvas<Window>, pos: &Position, settings: DrawSettings)
fn draw(&self, canvas: &mut Canvas<Window>, pos: &Position, settings: DrawSettings)
Draw everything
Auto Trait Implementations
impl<T> RefUnwindSafe for Margin<T>where
T: RefUnwindSafe,
impl<T> Send for Margin<T>
impl<T> Sync for Margin<T>where
T: Sync,
impl<T> Unpin for Margin<T>where
T: Unpin,
impl<T> UnwindSafe for Margin<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more