pub struct OpenXrExternalUiHostFrameParts<'a, 'ctx> {
pub instance: &'a Instance,
pub session: &'a Session<Vulkan>,
pub reference_space: &'a Space,
pub context: OpenXrExternalVulkanContext<'ctx>,
pub predicted_display_time: Time,
pub frame_time_ms: u128,
pub input_focused: bool,
}Expand description
Borrowed host state required to render one externally driven frame.
frame_time_ms defaults to zero and input_focused defaults to true.
The context lifetime may be shorter than the OpenXR handle lifetime.
§Examples
use ailloli_ui_openxr::{OpenXrExternalUiHostFrameParts, OpenXrExternalVulkanContext};
fn make<'a>(instance: &'a openxr::Instance, session: &'a openxr::Session<openxr::Vulkan>, space: &'a openxr::Space, context: OpenXrExternalVulkanContext<'a>, time: openxr::Time) -> OpenXrExternalUiHostFrameParts<'a, 'a> {
OpenXrExternalUiHostFrameParts::new(instance, session, space, context, time)
}Fields§
§instance: &'a InstanceInstance used for action-profile and hand-extension calls.
session: &'a Session<Vulkan>Running Vulkan-backed session.
reference_space: &'a SpaceSpace in which UI layer and input rays are expressed.
context: OpenXrExternalVulkanContext<'ctx>Borrowed Vulkan device, queue, pool, and optional memory properties.
predicted_display_time: TimeRuntime-predicted display time used to locate input.
frame_time_ms: u128Host frame interval in milliseconds; zero is allowed.
input_focused: boolWhether input is accepted; false clears retained UI and action state.
Implementations§
Source§impl<'a, 'ctx> OpenXrExternalUiHostFrameParts<'a, 'ctx>
impl<'a, 'ctx> OpenXrExternalUiHostFrameParts<'a, 'ctx>
Sourcepub fn new(
instance: &'a Instance,
session: &'a Session<Vulkan>,
reference_space: &'a Space,
context: OpenXrExternalVulkanContext<'ctx>,
predicted_display_time: Time,
) -> Self
pub fn new( instance: &'a Instance, session: &'a Session<Vulkan>, reference_space: &'a Space, context: OpenXrExternalVulkanContext<'ctx>, predicted_display_time: Time, ) -> Self
Creates frame parts with zero frame time and focused input.
§Examples
use ailloli_ui_openxr::{OpenXrExternalUiHostFrameParts, OpenXrExternalVulkanContext};
fn make<'a, 'ctx>(instance: &'a openxr::Instance, session: &'a openxr::Session<openxr::Vulkan>, space: &'a openxr::Space, context: OpenXrExternalVulkanContext<'ctx>, time: openxr::Time) -> OpenXrExternalUiHostFrameParts<'a, 'ctx> {
OpenXrExternalUiHostFrameParts::new(instance, session, space, context, time)
}Sourcepub fn with_frame_time_ms(self, frame_time_ms: u128) -> Self
pub fn with_frame_time_ms(self, frame_time_ms: u128) -> Self
Sets the UI runtime frame time in milliseconds.
§Examples
use ailloli_ui_openxr::OpenXrExternalUiHostFrameParts;
fn timed<'a, 'ctx>(frame: OpenXrExternalUiHostFrameParts<'a, 'ctx>) -> OpenXrExternalUiHostFrameParts<'a, 'ctx> { frame.with_frame_time_ms(16) }Sourcepub fn with_input_focused(self, input_focused: bool) -> Self
pub fn with_input_focused(self, input_focused: bool) -> Self
Sets whether this frame may poll and route input.
§Examples
use ailloli_ui_openxr::OpenXrExternalUiHostFrameParts;
fn unfocused<'a, 'ctx>(frame: OpenXrExternalUiHostFrameParts<'a, 'ctx>) -> OpenXrExternalUiHostFrameParts<'a, 'ctx> { frame.with_input_focused(false) }Auto Trait Implementations§
impl<'a, 'ctx> Freeze for OpenXrExternalUiHostFrameParts<'a, 'ctx>
impl<'a, 'ctx> !RefUnwindSafe for OpenXrExternalUiHostFrameParts<'a, 'ctx>
impl<'a, 'ctx> Send for OpenXrExternalUiHostFrameParts<'a, 'ctx>
impl<'a, 'ctx> Sync for OpenXrExternalUiHostFrameParts<'a, 'ctx>
impl<'a, 'ctx> Unpin for OpenXrExternalUiHostFrameParts<'a, 'ctx>
impl<'a, 'ctx> !UnwindSafe for OpenXrExternalUiHostFrameParts<'a, 'ctx>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more