pub struct DrawReceiver<S: Schema> { /* private fields */ }
Expand description
A receiver for drawing layout objects.
Implements the primitive functions that layout objects need to implement Draw
.
Implementations§
Source§impl<S: Schema> DrawReceiver<S>
impl<S: Schema> DrawReceiver<S>
Sourcepub fn draw(&mut self, obj: impl Draw<S>) -> Result<()>
pub fn draw(&mut self, obj: impl Draw<S>) -> Result<()>
Draw layout object obj
.
For instances, a new thread is spawned to add the instance once the underlying cell has been generated. If generation fails, the spawned thread may panic after this function has been called.
For error recovery, instance generation results should be checked using Instance::try_cell
before calling draw
.
§Panics
May cause a panic if generation of an underlying instance fails.
Trait Implementations§
Source§impl<S: Schema> Bbox for DrawReceiver<S>
impl<S: Schema> Bbox for DrawReceiver<S>
Source§impl<S: Schema> Clone for DrawReceiver<S>
impl<S: Schema> Clone for DrawReceiver<S>
Source§impl<S: Schema> Debug for DrawReceiver<S>
impl<S: Schema> Debug for DrawReceiver<S>
Source§impl<S: Schema> Draw<S> for DrawReceiver<S>
impl<S: Schema> Draw<S> for DrawReceiver<S>
Auto Trait Implementations§
impl<S> Freeze for DrawReceiver<S>
impl<S> RefUnwindSafe for DrawReceiver<S>
impl<S> Send for DrawReceiver<S>where
S: Send,
impl<S> Sync for DrawReceiver<S>where
S: Sync,
impl<S> Unpin for DrawReceiver<S>
impl<S> UnwindSafe for DrawReceiver<S>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<S, T> DrawBoxed<S> for T
impl<S, T> DrawBoxed<S> for T
Source§fn draw_boxed(self: Box<T>, recv: &mut DrawReceiver<S>) -> Result<(), Error>
fn draw_boxed(self: Box<T>, recv: &mut DrawReceiver<S>) -> Result<(), Error>
Draws
self
inside recv
.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request