pub enum BatchObject {
Null,
ServerObject(ServerObjectId),
Marker(BatchMarker),
Job(ServerJob),
ObjectJob(ServerObjectJob),
Create(ServerObjectFactory),
Value(Box<dyn Any + Send>),
}Expand description
One slot of the object stream.
Everything a UI-thread object hands to the server goes through one of
these variants. A Value payload is Send: render resources are held
in Arc, and what belongs to the UI thread crosses in a form of its own
(the shared form of a brush, the factory of an animation instance). The
Job and Create payloads are closures that are not Send yet; see
docs/porting/render-thread.md, stage R2.
Variants§
Null
ServerObject(ServerObjectId)
A reference to a server-side object.
Marker(BatchMarker)
Job(ServerJob)
ObjectJob(ServerObjectJob)
Preceded by the ServerObject the job works with.
Create(ServerObjectFactory)
Value(Box<dyn Any + Send>)
Any other reference-typed payload (render data resources, platform handles, lists).
Implementations§
Source§impl BatchObject
impl BatchObject
Sourcepub fn value<T: Any + Send>(value: T) -> BatchObject
pub fn value<T: Any + Send>(value: T) -> BatchObject
Wraps a payload value.
Auto Trait Implementations§
impl !RefUnwindSafe for BatchObject
impl !Sync for BatchObject
impl !UnwindSafe for BatchObject
impl Freeze for BatchObject
impl Send for BatchObject
impl Unpin for BatchObject
impl UnsafeUnpin for BatchObject
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more