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

MemberHubInvitationConfig

Struct MemberHubInvitationConfig 

Source
pub struct MemberHubInvitationConfig {
    pub lifetime: Option<Duration>,
    pub max_uses: Option<NonZeroU32>,
    pub permissions: Option<MemberHubPermissions>,
    pub label: Option<String>,
    pub app_grant_tag: Option<String>,
}
Expand description

Options for Runtime::create_member_hub_invitation (QarMemberHubInvitationInit). None selects the C API’s default.

Fields§

§lifetime: Option<Duration>

How long the invitation can be used, in whole seconds (rounded down). None: 24 h. At most 7 days, else crate::StatusCode::ARGUMENT_NOT_SUPPORTED. Under one second, or over u32::MAX seconds, is crate::Error::InvalidArgument before the call.

§max_uses: Option<NonZeroU32>

How many hubs may join with it. None: 1. At most 64, and never more than the calling app’s remaining quota of member hubs.

§permissions: Option<MemberHubPermissions>

None: MemberHubPermissions::JOIN | MemberHubPermissions::REJOIN | MemberHubPermissions::BRING_DEVICES. An empty set is crate::Error::InvalidArgument before the call, since the C API reads zero as the default.

§label: Option<String>

A UTF-8 label of at most 64 bytes, shown in the primary hub’s visualizer next to the invitation.

§app_grant_tag: Option<String>

Also grant one remote app on the joining PC (QarMemberHubInvitationAppGrantExt), under this app tag, with the app tag rules of crate::OnboardMethod::LocalApp. The grant is bound to the calling app’s approval and the tag. Only a member hub of this primary redeems it (a hub that is not a member ignores it and prompts its operator). There, the first executable that onboards as a local app with the invitation (crate::OnboardExtensions::remote_app_grant) is approved there without a prompt; later starts of that executable onboard with no invitation and no prompt, under the same peer id while no other live process holds it. A different executable is refused the grant once it is redeemed. One grant admits one app on one member PC, however many hubs max_uses lets join: issue one tag per remote app. With a grant, the calling app’s own approval is not extended to the member hub (without one it is). Revoking the calling app’s approval, or the granted one, on the primary revokes the granted app.

Trait Implementations§

Source§

impl Clone for MemberHubInvitationConfig

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 Debug for MemberHubInvitationConfig

Source§

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

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

impl Default for MemberHubInvitationConfig

Source§

fn default() -> Self

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

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.