API reference

aster_ui::external

Pre-1.0: signatures are not frozen. Generated from rustdoc JSON of the compiled crate; rustdoc JSON format version 60. Only public items are listed.

GPU/backend frame production without retained CPU frame planes.

Staging produces a private resource. Submission is a separate host action, paired with the exact accepted metadata; neither operation proves scanout.

Structs

structaster_ui::external::ExternalRenderer

pub struct ExternalRenderer { /* see fields */ }

Owner-thread external renderer. It admits CPU tile/vector scratch when needed, but never allocates CPU output planes or manufactures a CPU Frame. Backend traits being Send does not transfer this presentation owner:

fn requires_send<T: Send>() {}
requires_send::<aster_ui::external::ExternalRenderer>();

Methods

  • fn new(output: Output, pixel_budget: usize, producer: Box<dyn FrameProducer>) -> Result<Self, Error> — pixel_budget is a ceiling; no frame-sized allocation occurs here.
  • fn configured_output(&self) -> Output
  • fn replace_output(&mut self, output: Output) -> Result<bool, Error> — Changing the target preserves the previous accepted resource/metadata until a new stage succeeds. That old resource cannot be submitted to the replacement output. Host resize/input suspension remains explicit.
  • fn enable_vectors(&mut self, limits: VectorLimits) -> Result<(), Error>
  • fn enable_vectors_for_width(&mut self, limits: VectorLimits, max_width: usize) -> Result<(), Error>
  • fn set_raster_threads(&mut self, workers: usize)
  • fn frame_info(&self) -> Result<FrameInfo, Error>
  • fn submitted_info(&self) -> Option<FrameInfo> — Last successful host submission, cleared if a submission becomes uncertain.
  • fn last_error(&self) -> Option<&AccelError>
  • fn is_retired(&self) -> bool — A submission error or an unwound backend call retires this owner.
  • fn render(&mut self, recording: &Recording, index: u64, clear: Srgb8) -> Result<FrameInfo, Error>
  • fn render_scene(&mut self, scene: &Scene, index: u64, clear: Srgb8) -> Result<FrameInfo, Error>
  • fn submit(&mut self, expected: FrameInfo) -> Result<FrameInfo, Error> — Submit only the exact currently accepted frame. A stale request never reaches the backend. The caller acknowledges input only after success.

Traits

traitaster_ui::external::FrameProducer

pub trait FrameProducer

Backend production into private storage, without requiring CPU output bytes.

Required and provided methods

  • fn is_available(&self) -> bool — False when native/device loss invalidates retained resources. A refused stage may preserve an older frame only while its producer remains live.
  • fn stage(&mut self, frame: &mut AccelFrame<'_>) -> Result<Box<dyn StagedFrame>, AccelError> — Return only after every pixel has been produced/encoded successfully. Do not display the frame here. Failure must preserve previous staged resources; success returns an independently retained resource for submit.

traitaster_ui::external::StagedFrame

pub trait StagedFrame

A complete staged frame and everything required to submit it later. Dropping it must not display it. The resource must not borrow the staging command list and must keep its native resources alive until submission/drop.

Required and provided methods

  • fn submit(&mut self) -> Result<(), AccelError> — Submit these staged pixels. On uncertainty/error the host must suspend input and recover the presentation owner, rather than guess a new frame.