Skip to main content
QAROS Rust API Dev (main) · versions: Dev (main) · Developer Guide

OnboardExtensions

Struct OnboardExtensions 

Source
pub struct OnboardExtensions<'a> {
    pub adapter: Option<GraphicsAdapter>,
    pub without_graphics_device: bool,
    pub peer_id: Option<PeerId>,
    pub onboarding_id: Option<OnboardingId>,
    pub remote_app_grant: Option<&'a MemberHubInvitation>,
}
Expand description

The optional extensions of Runtime::onboard_with and Runtime::start_onboard, chained after the mode extension in this order: the remote-app grant, the adapter or no graphics device, the planned peer id (deprecated). The re-enrolled onboarding id (deprecated) goes into the init itself.

Fields§

§adapter: Option<GraphicsAdapter>

Creates the session’s GPU devices, and with them every render sender’s frame images, on this adapter (QarGraphicsDeviceId). None: the GPU QAROS selected for an app it launched (carried in the launch invite), else one the library picks.

§without_graphics_device: bool

Creates the session without a graphics device (QarGraphicsDeviceDisabledExt), for an application that never streams media, such as a companion that only drives app volumes, GUI panels or peers. The session starts faster: no Vulkan or D3D11 device, no adapter enumeration, no transfer plugins. Onboarding, peers, app volumes, GUI panels and rooms work as usual; creating a render sender, subscribing to render requests, creating a video sender and crate::Session::graphics_adapter fail with crate::StatusCode::GRAPHICS_DEVICE_NOT_INITIALIZED. Together with OnboardExtensions::adapter it is refused with Error::InvalidArgument before the call (the C API refuses it with crate::StatusCode::ARGUMENT_NOT_SUPPORTED). A local-app session shared by several onboards of one process keeps the choice of the onboard that created it.

§peer_id: Option<PeerId>
👎Deprecated:

joining under a planned peer id is no longer supported: a local app’s peer id comes from the hub, per approval and app_tag, and a companion’s from its invite; leave it None

Joins under this peer id (QarOnboardPeerIdExt), for a process whose peer id someone else planned and announced to the session. With OnboardMethod::Code or OnboardMethod::Invite only: it must equal any peer id the hub bound to the code or invite (a co-process invite always carries one), else onboarding fails. None takes that bound peer id, else a fresh one. The id is persisted with the slot, so a later rejoin keeps it. PeerId::ZERO and a local app (OnboardMethod::LocalApp, whose peer id the hub assigns) are refused with Error::InvalidArgument before the call; the C API refuses both with crate::StatusCode::ARGUMENT_NOT_SUPPORTED.

§onboarding_id: Option<OnboardingId>
👎Deprecated:

re-enrolling a persisted slot is no longer supported: join as a local app (OnboardMethod::LocalApp), which is stateless; leave it None

Re-enrolls this persisted slot (QarOnboardInit::onboarding_id) instead of creating a new identity: the slot is reused when it survives and recreated under the same id after a wipe, so a persisted id never goes stale, and Onboarded::onboarding_id echoes it. OnboardingId::ZERO and a local app (stateless) are refused with Error::InvalidArgument before the call. A runtime with RuntimeConfig::ephemeral_storage refuses it with crate::StatusCode::ARGUMENT_NOT_SUPPORTED, and a slot with a live session with crate::StatusCode::ONBOARDING_SESSION_STILL_ACTIVE.

§remote_app_grant: Option<&'a MemberHubInvitation>

Redeems a member hub’s remote-app grant (QarOnboardRemoteAppGrantExt): the invitation the primary’s app created with crate::MemberHubInvitationConfig::app_grant_tag. With OnboardMethod::LocalApp only, else Error::InvalidArgument before the call (the C API refuses it with crate::StatusCode::ARGUMENT_NOT_SUPPORTED). Only a member hub redeems a grant: join the hub on this PC to the invitation’s primary first (Runtime::join_hub_as_member). A hub that is not a member ignores the grant, with no error of its own, and asks its operator as for any local app: the approval prompt, then crate::StatusCode::ONBOARDING_APPROVAL_DENIED or crate::StatusCode::ONBOARDING_APPROVAL_TIMEOUT when nobody allows it. On a member hub, when no approval admits this executable yet, the primary records it as the app the grant admits, without a prompt; once another executable redeemed the grant, or when the primary refuses it, onboarding fails with crate::StatusCode::ONBOARDING_APPROVAL_DENIED. When an approval already admits it, the invitation is not used. The grant’s app tag applies; the method’s app_tag is not needed. The invitation is borrowed for the call (for Runtime::start_onboard, for the start call, during which the library copies it). Always None where the bindings lack member hubs, since no MemberHubInvitation exists there.

Trait Implementations§

Source§

impl<'a> Clone for OnboardExtensions<'a>

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<'a> Copy for OnboardExtensions<'a>

Source§

impl<'a> Debug for OnboardExtensions<'a>

Source§

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

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

impl<'a> Default for OnboardExtensions<'a>

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<'a> !Send for OnboardExtensions<'a>

§

impl<'a> !Sync for OnboardExtensions<'a>

§

impl<'a> Freeze for OnboardExtensions<'a>

§

impl<'a> RefUnwindSafe for OnboardExtensions<'a>

§

impl<'a> Unpin for OnboardExtensions<'a>

§

impl<'a> UnsafeUnpin for OnboardExtensions<'a>

§

impl<'a> UnwindSafe for OnboardExtensions<'a>

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.