pub struct HaloPreviewClient { /* private fields */ }Expand description
Native Halo preview client over the shared one-card glance adapter.
Implementations§
Source§impl HaloPreviewClient
impl HaloPreviewClient
Sourcepub fn new(caps: &SurfaceCaps) -> Result<Self>
pub fn new(caps: &SurfaceCaps) -> Result<Self>
Builds a preview client from mono-HUD surface capabilities.
§Errors
Returns an error unless the caps resolve to mono-HUD glasses.
Sourcepub fn receive(&mut self, scene: Expr) -> Result<()>
pub fn receive(&mut self, scene: Expr) -> Result<()>
Retains a new content-rate scene/glance card.
§Errors
Returns an error when the Scene is not one valid glance card.
Sourcepub fn frame(&self, state: &GlanceState) -> Result<Rc<Expr>>
pub fn frame(&self, state: &GlanceState) -> Result<Rc<Expr>>
Fits the retained card to the Halo budget for one local input state.
§Errors
Returns an error before the first content receipt or when the shared glance adapter rejects the card.
Sourcepub fn content_receipts(&self) -> u64
pub fn content_receipts(&self) -> u64
Returns the number of content-rate cards received.
Trait Implementations§
Auto Trait Implementations§
impl !Send for HaloPreviewClient
impl !Sync for HaloPreviewClient
impl Freeze for HaloPreviewClient
impl RefUnwindSafe for HaloPreviewClient
impl Unpin for HaloPreviewClient
impl UnsafeUnpin for HaloPreviewClient
impl UnwindSafe for HaloPreviewClient
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