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

QarRequestInviteInit

Struct QarRequestInviteInit 

Source
#[repr(C)]
pub struct QarRequestInviteInit { pub header: QarStructureHeader, pub app_tag: *const c_char, }
Expand description

@brief Mint a co-process invite: a one-time invite for a process this app starts on the same PC (a companion in another language, a helper process).

The hub binds the invite to the peer id it remembers for this session’s approval and app_tag (see QarOnboardLocalAppTagExt), so the co-process joins as the same peer on every start while no other live process holds that id.

  • Only a session joined by local enrollment (QarOnboardLocalAppExt), or a process the QAROS launcher started, may request one.
  • The invite works for every start of the co-process while this session lives: it names this app on this PC, not the hub, and onboarding with it asks this app for a fresh one-time hub invite on each attempt. It reaches nobody beyond this user on this PC and does not expire on its own. The co-process’s onboarding tries again (250 ms doubling to 5 s) while this app or the hub is away, and fails at once only for what no retry changes (a forged invite, the approval denied, this session gone): bound it with a cancel token. A platform without a local endpoint for this app gets the hub’s invite instead: single use, valid for 60 s.
  • The co-process gets the short local certificate profile under this app’s approval; its certificate renews only while the requesting session is still in the session, and revoking the approval revokes both.
  • The co-process should chain QarRuntimeEphemeralStorageExt so it writes nothing to disk.

An invite for another PC, or for a new device, is not available to apps: pairing codes and unbound invites are minted by the hub’s operators.

A struct whose header carries any other structure type, including a retired one (see QarStructureType), is refused with QAR_STATUS_ARGUMENT_NOT_SUPPORTED.

Fields§

§header: QarStructureHeader

< QAR_STRUCTURE_TYPE_SESSION_REQUEST_INVITE_INIT

§app_tag: *const c_char

Required; the co-process’s app tag. Same rules as QarOnboardLocalAppTagExt::app_tag. Copied before the call returns.

Trait Implementations§

Source§

impl Clone for QarRequestInviteInit

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 Copy for QarRequestInviteInit

Source§

impl Debug for QarRequestInviteInit

Source§

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

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

impl PartialEq for QarRequestInviteInit

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for QarRequestInviteInit

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.