pub struct ProjectsManager { /* private fields */ }Expand description
Projects manager
Implementations§
Source§impl ProjectsManager
impl ProjectsManager
Sourcepub fn new(storage: StorageManager, identity: EnhancedIdentity) -> Self
pub fn new(storage: StorageManager, identity: EnhancedIdentity) -> Self
Create new projects manager
Sourcepub async fn create_project(
&mut self,
name: String,
description: String,
organization_id: OrganizationId,
department_id: Option<DepartmentId>,
team_id: Option<TeamId>,
owner_group: GroupId,
) -> Result<Project, ProjectsError>
pub async fn create_project( &mut self, name: String, description: String, organization_id: OrganizationId, department_id: Option<DepartmentId>, team_id: Option<TeamId>, owner_group: GroupId, ) -> Result<Project, ProjectsError>
Create a new project
Sourcepub async fn upload_document(
&mut self,
project_id: ProjectId,
folder_id: FolderId,
name: String,
description: String,
content: &[u8],
document_type: DocumentType,
) -> Result<Document, ProjectsError>
pub async fn upload_document( &mut self, project_id: ProjectId, folder_id: FolderId, name: String, description: String, content: &[u8], document_type: DocumentType, ) -> Result<Document, ProjectsError>
Upload a document
Sourcepub async fn download_document(
&mut self,
document_id: &DocumentId,
) -> Result<Vec<u8>, ProjectsError>
pub async fn download_document( &mut self, document_id: &DocumentId, ) -> Result<Vec<u8>, ProjectsError>
Download a document
Sourcepub async fn create_document_version(
&mut self,
document_id: &DocumentId,
content: &[u8],
comment: String,
) -> Result<DocumentVersion, ProjectsError>
pub async fn create_document_version( &mut self, document_id: &DocumentId, content: &[u8], comment: String, ) -> Result<DocumentVersion, ProjectsError>
Create a new version of a document
Sourcepub async fn approve_document(
&mut self,
document_id: &DocumentId,
comment: Option<String>,
) -> Result<(), ProjectsError>
pub async fn approve_document( &mut self, document_id: &DocumentId, comment: Option<String>, ) -> Result<(), ProjectsError>
Approve a document
Auto Trait Implementations§
impl !Freeze for ProjectsManager
impl !RefUnwindSafe for ProjectsManager
impl Send for ProjectsManager
impl Sync for ProjectsManager
impl Unpin for ProjectsManager
impl !UnwindSafe for ProjectsManager
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