Trait limn_core::widget::draw::Draw
[−]
[src]
pub trait Draw: Debug + Any { fn draw(
&mut self,
bounds: Rect,
crop_to: Rect,
renderer: &mut RenderBuilder
); }
Required Methods
fn draw(&mut self, bounds: Rect, crop_to: Rect, renderer: &mut RenderBuilder)
Methods
impl Draw
pub fn is<T: Draw>(&self) -> bool
Returns true if the boxed type is the same as T
pub fn downcast_ref<T: Draw>(&self) -> Option<&T>
Returns some reference to the boxed value if it is of type T
, or
None
if it isn't.
ⓘImportant traits for &'a mut Ipub unsafe fn downcast_ref_unchecked<T: Draw>(&self) -> &T
ⓘImportant traits for &'a mut I
Returns a reference to the boxed value, blindly assuming it to be of type T
.
If you are not absolutely certain of T
, you must not call this.
pub fn downcast_mut<T: Draw>(&mut self) -> Option<&mut T>
Returns some mutable reference to the boxed value if it is of type T
, or
None
if it isn't.
ⓘImportant traits for &'a mut Ipub unsafe fn downcast_mut_unchecked<T: Draw>(&mut self) -> &mut T
ⓘImportant traits for &'a mut I
Returns a mutable reference to the boxed value, blindly assuming it to be of type T
.
If you are not absolutely certain of T
, you must not call this.
impl Draw
pub fn downcast<T: Draw>(self: Box<Self>) -> Result<Box<T>, Box<Self>>
Returns the boxed value if it is of type T
, or Err(Self)
if it isn't.
ⓘImportant traits for Box<I>pub unsafe fn downcast_unchecked<T: Draw>(self: Box<Self>) -> Box<T>
ⓘImportant traits for Box<I>
Returns the boxed value, blindly assuming it to be of type T
.
If you are not absolutely certain of T
, you must not call this.