Skip to main content

ParticleBatch

Struct ParticleBatch 

Source
pub struct ParticleBatch { /* private fields */ }
Expand description

Validated opaque instance payload, consumed directly by CPU/GPU paths.

Implementations§

Source§

impl ParticleBatch

Source

pub fn len(&self) -> usize

Number of dot/sprite/segment instances, including Plexus links.

Source

pub fn is_empty(&self) -> bool

Whether this payload contains no instances.

Source

pub fn bounds(&self) -> Rect

Conservative local geometric extent (before output antialias padding).

Trait Implementations§

Source§

impl Clone for ParticleBatch

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ParticleBatch

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drawable for ParticleBatch

Source§

fn bounds(&self, context: &DrawContext) -> Result<Rect, ValidationError>

Local layout/ink bounds before node placement; invalid content is an error.
Source§

fn draw( &self, _: &DrawContext, canvas: &mut Canvas<'_>, ) -> Result<(), ValidationError>

Emits local commands; validation errors propagate without partial output.
Source§

fn baseline(&self, _context: &DrawContext) -> Option<f64>

Real horizontal text baseline in local coordinates; geometry has none.
Source§

impl InstanceBatch for ParticleBatch

Source§

fn analytic_upload(&self) -> Option<&AnalyticInstanceUpload>

Optional checked seeded trajectory program replacing evaluated primitive positions. Existing generic batches and fixed-step simulations retain their ordinary uploads.
Source§

fn analytic_fallback(&self) -> Option<&ValidationError>

Explicit reason an otherwise analytic batch retains evaluated CPU primitives.
Source§

fn blend(&self) -> InstanceBlend

Batch compositing policy; the default is source-over.
Source§

fn len(&self) -> usize

Number of independently painted instances.
Source§

fn bounds(&self) -> Rect

Conservative local bounds.
Source§

fn bytes(&self) -> u64

Retained logical bytes charged during preparation.
Source§

fn work(&self) -> u64

Conservative sampling work per output pixel.
Source§

fn spatial(&self) -> Option<&dyn SpatialInstances>

Optional conservative supports and ordered sampling; defaults to full-batch traversal.
Source§

fn validate(&self) -> Result<(), ValidationError>

Validates all stored instance/style values, including hidden instances.
Source§

fn sample( &self, point: Point, antialias: f64, destination: [f32; 4], space: BlendSpace, composite: InstanceComposite, ) -> Result<[f32; 4], ValidationError>

Samples instances in their declared order using the consumer’s compositor.
Source§

fn sample_with_zero_identity( &self, point: Point, antialias: f64, destination: [f32; 4], space: BlendSpace, composite: InstanceComposite, ) -> Result<[f32; 4], ValidationError>

Samples with a compositor for which every all-zero source, including signed zeros, is an infallible identity without observable side effects. Implementations may omit those calls, but must preserve nonzero sample order and errors. The default retains the ordinary sampling behavior. Callers with an arbitrary compositor must use Self::sample instead.
Source§

fn as_any(&self) -> &dyn Any

Resolves concrete content only within its owning implementation.
Source§

fn content_eq(&self, other: &dyn InstanceBatch) -> bool

Compares the logical payload of two instance records.
Source§

fn is_empty(&self) -> bool

Whether no instances are present.
Source§

fn upload_bytes(&self) -> u64

Exact upload charge for preflight admission; zero by default for CPU-only batches.
Source§

fn upload(&self) -> Result<Option<InstanceUpload>, ValidationError>

Checked evaluated primitives, or None when only CPU sampling is available.
Source§

impl PartialEq for ParticleBatch

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl SpatialInstances for ParticleBatch

Source§

fn support(&self, index: usize, antialias: f64) -> Rect

Local support, including antialiasing and numeric guards, for one instance.
Source§

fn sample_indices( &self, indices: &[usize], point: Point, antialias: f64, destination: [f32; 4], space: BlendSpace, composite: InstanceComposite, ) -> Result<[f32; 4], ValidationError>

Samples only the ascending, in-range instance indices supplied by a consumer. The compositor must treat all-zero sources as infallible identities.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Output> IntoSceneOutput for Output
where Output: Into<Node>,

Source§

fn into_scene_output(self) -> Result<Node, Error>

Preserves the original failure category and source.
Source§

impl<Value> NodeModifiers for Value
where Value: Into<Node>,

Source§

fn layered_shadow(self, color: Color, radius: f64, offset: Vector2) -> Node

Layers three soft silhouettes behind a single untouched source snapshot.
Source§

fn elevated(self, elevation: Elevation) -> Node

Layers contact, key and ambient soft shadows that scale with an Elevation.
Source§

fn gate_weave(self, seed: u64, frame: u64, amount: f64) -> Node

Repeatable physical gate drift, keyed only by an explicit frame and seed.
Source§

fn next_to(self, reference: &Node, side: Side, gap: f64) -> Node

Places content next to the reference during compile-time layout.
Source§

fn align_to(self, reference: &Node, edge: Side) -> Node

Aligns an edge with a compile-time measured reference snapshot.
Source§

fn at(self, position: impl Into<Point>) -> Node

Places the selected pivot at a parent-space point, before translation.
Source§

fn translate(self, horizontal: f64, vertical: f64) -> Node

Adds parent-space translation, after scale and rotation.
Source§

fn rotate(self, radians: f64) -> Node

Adds clockwise radians about the pivot, after scale and before translation.
Source§

fn scale(self, factor: f64) -> Node

Multiplies both scale factors; negative factors reflect and zero collapses.
Source§

fn scale_xy(self, horizontal: f64, vertical: f64) -> Node

Multiplies per-axis scale factors about the pivot.
Source§

fn pivot(self, pivot: Pivot) -> Node

Replaces the local-space pivot; defaults to the layout-bounds center.
Source§

fn opacity(self, opacity: f64) -> Node

Replaces subtree opacity; invalid values are reported during conversion.
Source§

fn blend_mode(self, mode: BlendMode) -> Node

Blends the completed subtree once against its immediate parent backdrop. Read more
Source§

fn filter(self, filter: Filter) -> Node

Appends a source-only filter, preserving declaration order. Read more
Source§

fn clip(self, shape: impl IntoShapeClip) -> Node

Replaces the subtree’s local path-coverage clip without changing layout. Read more
Source§

fn clip_with(self, shape: impl IntoShapeClip, mode: ClipMode) -> Node

Clips with explicit coverage multiplication or geometric intersection.
Source§

fn mask(self, mask: impl Into<Node>, mode: MaskMode) -> Node

Replaces the local geometric rectangle clip without changing layout. Read more
Source§

fn z_index(self, index: i32) -> Node

Replaces sibling-local stacking order; ties retain insertion order.
Source§

fn visible(self, visible: bool) -> Node

Removes the snapshot entirely when false, rather than evaluating it hidden.
Source§

fn named(self, name: &str) -> Node

Attaches a diagnostic name without changing artwork or draw order.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.