pub struct CollaborativeWorkspace {
pub id: String,
pub name: String,
pub members: Vec<ProjectMember>,
pub documents: Vec<SharedDocument>,
pub channels: Vec<CommunicationChannel>,
pub tasks: Vec<Task>,
pub version_control: VersionControl,
pub settings: WorkspaceSettings,
pub access_control: AccessControl,
pub activity_log: Vec<Activity>,
pub created_at: DateTime<Utc>,
pub modified_at: DateTime<Utc>,
}Expand description
Collaborative workspace for research projects
Fields§
§id: StringWorkspace identifier
name: StringWorkspace name
members: Vec<ProjectMember>Project members
documents: Vec<SharedDocument>Shared documents
channels: Vec<CommunicationChannel>Communication channels
tasks: Vec<Task>Task assignments
version_control: VersionControlVersion control information
settings: WorkspaceSettingsWorkspace settings
access_control: AccessControlAccess control
activity_log: Vec<Activity>Activity log
created_at: DateTime<Utc>Creation timestamp
modified_at: DateTime<Utc>Last modified timestamp
Implementations§
Source§impl CollaborativeWorkspace
impl CollaborativeWorkspace
Sourcepub fn add_member(&mut self, user: UserInfo, role: MemberRole) -> Result<()>
pub fn add_member(&mut self, user: UserInfo, role: MemberRole) -> Result<()>
Add a member to the workspace
Sourcepub fn create_document(
&mut self,
name: &str,
document_type: DocumentType,
ownerid: &str,
) -> Result<String>
pub fn create_document( &mut self, name: &str, document_type: DocumentType, ownerid: &str, ) -> Result<String>
Create a shared document
Sourcepub fn create_channel(
&mut self,
name: &str,
channel_type: ChannelType,
creatorid: &str,
) -> Result<String>
pub fn create_channel( &mut self, name: &str, channel_type: ChannelType, creatorid: &str, ) -> Result<String>
Create a communication channel
Sourcepub fn create_task(
&mut self,
title: &str,
task_type: TaskType,
creatorid: &str,
) -> Result<String>
pub fn create_task( &mut self, title: &str, task_type: TaskType, creatorid: &str, ) -> Result<String>
Create a task
Sourcepub fn has_permission(&self, userid: &str, permission: &Permission) -> bool
pub fn has_permission(&self, userid: &str, permission: &Permission) -> bool
Check if a user has a specific permission
Sourcepub fn log_activity(
&mut self,
user_id: &str,
activitytype: ActivityType,
description: String,
resources: Vec<String>,
)
pub fn log_activity( &mut self, user_id: &str, activitytype: ActivityType, description: String, resources: Vec<String>, )
Log an activity
Sourcepub fn generate_statistics(&self) -> WorkspaceStatistics
pub fn generate_statistics(&self) -> WorkspaceStatistics
Generate workspace statistics
Trait Implementations§
Source§impl Clone for CollaborativeWorkspace
impl Clone for CollaborativeWorkspace
Source§fn clone(&self) -> CollaborativeWorkspace
fn clone(&self) -> CollaborativeWorkspace
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CollaborativeWorkspace
impl Debug for CollaborativeWorkspace
Source§impl<'de> Deserialize<'de> for CollaborativeWorkspace
impl<'de> Deserialize<'de> for CollaborativeWorkspace
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CollaborativeWorkspace
impl RefUnwindSafe for CollaborativeWorkspace
impl Send for CollaborativeWorkspace
impl Sync for CollaborativeWorkspace
impl Unpin for CollaborativeWorkspace
impl UnwindSafe for CollaborativeWorkspace
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.