Struct ShareApi

Source
pub struct ShareApi<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> ShareApi<'a>

Source

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
Source

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
Source

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
Source

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
Source

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
Source

pub async fn get( &self, details: Option<Details>, id: Uuid, ) -> Result<Share, Error>

The show action lists the properties of a single share.

Notes

  • This action still works if sharing has been disabled
Source

pub async fn find( &self, criteria: ShareSearch, details: Option<Details>, ) -> Result<Vec<Share>, Error>

The find action can be used to find all shares matching the given search criteria

Notes

  • This action still works if sharing has been disabled

Auto Trait Implementations§

§

impl<'a> Freeze for ShareApi<'a>

§

impl<'a> !RefUnwindSafe for ShareApi<'a>

§

impl<'a> Send for ShareApi<'a>

§

impl<'a> Sync for ShareApi<'a>

§

impl<'a> Unpin for ShareApi<'a>

§

impl<'a> !UnwindSafe for ShareApi<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,