pub struct Team<'a> { /* private fields */ }Expand description
Represents an Aranya Team.
Implementations§
Source§impl Team<'_>
impl Team<'_>
Sourcepub async fn encrypt_psk_seed_for_peer(
&self,
peer_enc_pk: &[u8],
) -> Result<Vec<u8>>
pub async fn encrypt_psk_seed_for_peer( &self, peer_enc_pk: &[u8], ) -> Result<Vec<u8>>
Encrypts the team’s QUIC syncer PSK seed for a peer.
peer_enc_pk is the public encryption key of the peer device.
See PublicKeyBundle::encryption.
Sourcepub async fn add_sync_peer(
&self,
addr: Addr,
config: SyncPeerConfig,
) -> Result<()>
pub async fn add_sync_peer( &self, addr: Addr, config: SyncPeerConfig, ) -> Result<()>
Adds a peer for automatic periodic Aranya state syncing.
Sourcepub async fn sync_now(
&self,
addr: Addr,
cfg: Option<SyncPeerConfig>,
) -> Result<()>
pub async fn sync_now( &self, addr: Addr, cfg: Option<SyncPeerConfig>, ) -> Result<()>
Immediately syncs with the peer.
If config is None, default values (including those from the daemon) will
be used.
Sourcepub async fn remove_sync_peer(&self, addr: Addr) -> Result<()>
pub async fn remove_sync_peer(&self, addr: Addr) -> Result<()>
Removes a peer from automatic Aranya state syncing.
Source§impl Team<'_>
impl Team<'_>
Sourcepub async fn add_device(
&self,
keys: PublicKeyBundle,
initial_role: Option<RoleId>,
) -> Result<()>
pub async fn add_device( &self, keys: PublicKeyBundle, initial_role: Option<RoleId>, ) -> Result<()>
Adds a device to the team with an optional initial role.
Source§impl Team<'_>
impl Team<'_>
Sourcepub async fn setup_default_roles(&self, owning_role: RoleId) -> Result<Roles>
pub async fn setup_default_roles(&self, owning_role: RoleId) -> Result<Roles>
Sets up the default team roles.
owning_role will be the initial owner of the default
roles.
It returns the the roles that were created.
Sourcepub async fn role_owners(&self, role: RoleId) -> Result<Roles>
pub async fn role_owners(&self, role: RoleId) -> Result<Roles>
Returns the roles that own role.
Source§impl Team<'_>
impl Team<'_>
Sourcepub async fn create_label(
&self,
label_name: Text,
managing_role_id: RoleId,
) -> Result<LabelId>
pub async fn create_label( &self, label_name: Text, managing_role_id: RoleId, ) -> Result<LabelId>
Create a label.
Sourcepub async fn delete_label(&self, label_id: LabelId) -> Result<()>
pub async fn delete_label(&self, label_id: LabelId) -> Result<()>
Delete a label.
Sourcepub async fn add_label_managing_role(
&self,
label_id: LabelId,
managing_role_id: RoleId,
) -> Result<()>
pub async fn add_label_managing_role( &self, label_id: LabelId, managing_role_id: RoleId, ) -> Result<()>
Add label managing role
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Team<'a>
impl<'a> RefUnwindSafe for Team<'a>
impl<'a> Send for Team<'a>
impl<'a> Sync for Team<'a>
impl<'a> Unpin for Team<'a>
impl<'a> UnsafeUnpin for Team<'a>
impl<'a> UnwindSafe for Team<'a>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.