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.