Skip to main content

Evaluation

Struct Evaluation 

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

Time, quality and explicit resources for one evaluation.

SceneContext and DrawContext build on the same environment so deferred content sees identical time, quality, assets, fonts, diagnostics and compute caches whichever one measures or records it. The environment is immutable once shared; builders take self and drawing contexts hold it by Arc.

Implementations§

Source§

impl Evaluation

Source

pub fn new() -> Self

Creates a Final-quality environment at time zero without assets or caches.

Source

pub fn with_quality(self, quality: RenderQuality) -> Self

Selects an explicit approximation policy for deferred content.

Source

pub fn quality(&self) -> RenderQuality

Production quality is the default.

Source

pub fn with_time(self, time: Time) -> Self

Supplies scene-local signed time to deferred content effects.

Source

pub fn time(&self) -> Time

Scene-local time; defaults to zero.

Source

pub fn with_assets(self, assets: &Assets) -> Self

Captures the same lazy/preloaded owner used by the enclosing session.

The assets inherit this environment’s diagnostics, and their font environment replaces any previously supplied one.

Source

pub fn assets(&self) -> &Assets

Explicit resource owner; an unconfigured environment resolves no relative files.

Source

pub fn with_fonts(self, fonts: impl Into<FontEnvironment>) -> Self

Supplies a shared explicit font snapshot.

Source

pub fn fonts(&self) -> Option<&FontEnvironment>

Font environment for paragraph text, optional for geometry-only content.

Source

pub fn with_diagnostics(self, diagnostics: RequestDiagnostics) -> Self

Carries request diagnostics explicitly through deferred content compilation.

Source

pub fn diagnostics(&self) -> &RequestDiagnostics

Request-owned sink; cloning the environment preserves its identity.

Source

pub fn with_cache(self, cache: RenderCache) -> Self

Supplies partitioned compute caches shared by rendering workers.

Source

pub fn cache(&self) -> Option<&RenderCache>

Shared compute-cache partitions, absent for standalone uncached evaluation.

Source

pub fn shared(self) -> Arc<Self> ⓘ

Shares this environment between contexts without copying it.

Trait Implementations§

Source§

impl Clone for Evaluation

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 Evaluation

Source§

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

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

impl Default for Evaluation

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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<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<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.