pub struct TeamManager { /* private fields */ }Expand description
Manager for team workspaces
Implementations§
Source§impl TeamManager
impl TeamManager
Sourcepub async fn create_team(
&self,
name: String,
description: Option<String>,
owner_id: MemberId,
owner_name: String,
owner_email: String,
) -> TeamWorkspace
pub async fn create_team( &self, name: String, description: Option<String>, owner_id: MemberId, owner_name: String, owner_email: String, ) -> TeamWorkspace
Create a new team
Sourcepub async fn get_team(&self, team_id: TeamId) -> Option<TeamWorkspace>
pub async fn get_team(&self, team_id: TeamId) -> Option<TeamWorkspace>
Get a team by ID
Sourcepub async fn get_user_teams(&self, user_id: MemberId) -> Vec<TeamWorkspace>
pub async fn get_user_teams(&self, user_id: MemberId) -> Vec<TeamWorkspace>
Get all teams for a user
Sourcepub async fn update_team_settings(
&self,
team_id: TeamId,
settings: TeamSettings,
) -> Option<TeamWorkspace>
pub async fn update_team_settings( &self, team_id: TeamId, settings: TeamSettings, ) -> Option<TeamWorkspace>
Update team settings
Sourcepub async fn invite_member(
&self,
team_id: TeamId,
inviter_id: MemberId,
invitee_email: String,
role: Role,
message: Option<String>,
) -> Option<TeamInvitation>
pub async fn invite_member( &self, team_id: TeamId, inviter_id: MemberId, invitee_email: String, role: Role, message: Option<String>, ) -> Option<TeamInvitation>
Invite a member to a team
Sourcepub async fn accept_invitation(
&self,
invitation_id: Uuid,
user_id: MemberId,
display_name: String,
email: String,
) -> Result<TeamWorkspace, String>
pub async fn accept_invitation( &self, invitation_id: Uuid, user_id: MemberId, display_name: String, email: String, ) -> Result<TeamWorkspace, String>
Accept an invitation
Sourcepub async fn remove_member(
&self,
team_id: TeamId,
member_id: MemberId,
) -> Result<(), String>
pub async fn remove_member( &self, team_id: TeamId, member_id: MemberId, ) -> Result<(), String>
Remove a member from a team
Sourcepub async fn update_member_role(
&self,
team_id: TeamId,
member_id: MemberId,
new_role: Role,
) -> Result<(), String>
pub async fn update_member_role( &self, team_id: TeamId, member_id: MemberId, new_role: Role, ) -> Result<(), String>
Update member role
Share a session with the team
Sourcepub async fn update_presence(&self, team_id: TeamId, presence: PresenceInfo)
pub async fn update_presence(&self, team_id: TeamId, presence: PresenceInfo)
Update presence for a user
Sourcepub async fn get_presences(&self, team_id: TeamId) -> Vec<PresenceInfo>
pub async fn get_presences(&self, team_id: TeamId) -> Vec<PresenceInfo>
Get active presences for a team
Sourcepub fn subscribe(&self) -> Receiver<(TeamId, CollaborationEvent)>
pub fn subscribe(&self) -> Receiver<(TeamId, CollaborationEvent)>
Subscribe to collaboration events
Sourcepub async fn broadcast_event(&self, team_id: TeamId, event: CollaborationEvent)
pub async fn broadcast_event(&self, team_id: TeamId, event: CollaborationEvent)
Broadcast a collaboration event
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TeamManager
impl !RefUnwindSafe for TeamManager
impl Send for TeamManager
impl Sync for TeamManager
impl Unpin for TeamManager
impl UnsafeUnpin for TeamManager
impl !UnwindSafe for TeamManager
Blanket Implementations§
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more