pub struct Renderer<B: Toolkit> {
pub kind: PieceKind,
pub make: fn(&mut B, &dyn Any, NodeId) -> B::Handle,
pub update: fn(&mut B, &B::Handle, &dyn Any),
pub measure: Option<MeasureFn<B>>,
}Expand description
A third-party piece’s per-toolkit implementation. make receives the concrete backend
(public helper surface) and returns a native handle the backend then owns like any built-in.
Fields§
§kind: PieceKind§make: fn(&mut B, &dyn Any, NodeId) -> B::Handle§update: fn(&mut B, &B::Handle, &dyn Any)§measure: Option<MeasureFn<B>>Auto Trait Implementations§
impl<B> Freeze for Renderer<B>
impl<B> RefUnwindSafe for Renderer<B>
impl<B> Send for Renderer<B>
impl<B> Sync for Renderer<B>
impl<B> Unpin for Renderer<B>
impl<B> UnsafeUnpin for Renderer<B>
impl<B> UnwindSafe for Renderer<B>
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