pub struct Canvas2DBuilder {
pub width: Option<f32>,
pub height: Option<f32>,
pub class: Option<&'static str>,
pub on_draw: Option<Rc<dyn Fn(&mut Canvas2DContext)>>,
pub children: Option<Vec<NodeBlueprint>>,
pub __strata_key: Option<String>,
}Fields§
§width: Option<f32>§height: Option<f32>§class: Option<&'static str>§on_draw: Option<Rc<dyn Fn(&mut Canvas2DContext)>>§children: Option<Vec<NodeBlueprint>>§__strata_key: Option<String>Implementations§
Source§impl Canvas2DBuilder
impl Canvas2DBuilder
pub fn width(self, val: impl Into<Option<f32>>) -> Self
pub fn height(self, val: impl Into<Option<f32>>) -> Self
pub fn class(self, val: impl Into<Option<&'static str>>) -> Self
pub fn on_draw<__Marker>( self, val: impl __Canvas2D_on_draw_IntoCallback<__Marker>, ) -> Self
pub fn on_draw_fn(self, val: impl Fn(&mut Canvas2DContext) + 'static) -> Self
pub fn children(self, children: Vec<NodeBlueprint>) -> Self
pub fn key(self, key: impl Display) -> Self
pub fn build(self) -> View
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Canvas2DBuilder
impl !Send for Canvas2DBuilder
impl !Sync for Canvas2DBuilder
impl !UnwindSafe for Canvas2DBuilder
impl Forget for Canvas2DBuilder
impl Freeze for Canvas2DBuilder
impl Move for Canvas2DBuilder
impl Unpin for Canvas2DBuilder
impl UnsafeUnpin for Canvas2DBuilder
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