pub struct ShareApi<'a> { /* private fields */ }
Implementations§
Sourcepub async fn partners(
&self,
search: Option<String>,
limit: Option<u64>,
) -> Result<Vec<Partner>, Error>
pub async fn partners( &self, search: Option<String>, limit: Option<u64>, ) -> Result<Vec<Partner>, Error>
This commands returns an array of users that the current user can share with.
Notes
- This command will fail if sharing is disabled
- The limit can not be less than 5 or more than 256
- This api endpoint has a rate limit of 45 requests per minute
Sourcepub async fn create(&self, create: CreateShare) -> Result<Uuid, Error>
pub async fn create(&self, create: CreateShare) -> Result<Uuid, Error>
The create action creates a new share with the given attributes.
Notes
- This action will fail if the password is hidden or the CSE does not support sharing
- You can not share a password with the same user more than once
- This command will fail if sharing is disabled
Sourcepub async fn update(&self, update: UpdateShare) -> Result<Uuid, Error>
pub async fn update(&self, update: UpdateShare) -> Result<Uuid, Error>
The update action changes the properties of an existing share.
Notes
- You can only edit a share if it is owned by the user
- This command will fail if sharing is disabled
Sourcepub async fn delete(&self, share_id: Uuid) -> Result<Uuid, Error>
pub async fn delete(&self, share_id: Uuid) -> Result<Uuid, Error>
The delete action deletes a share.
Notes
- You can only delete shares owned by the user.
- If you want to delete a share where the current user is the receiver, you need to delete the password instead
- This action still works if sharing has been disabled
Sourcepub async fn list(&self, details: Option<Details>) -> Result<Vec<Share>, Error>
pub async fn list(&self, details: Option<Details>) -> Result<Vec<Share>, Error>
The list action lists all shares with the user as owner or receiver.
Notes
- This action still works if sharing has been disabled
Auto Trait Implementations§
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