[][src]Struct nextcloud_passwords_client::share::ShareApi

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

Implementations

impl<'a> ShareApi<'a>[src]

pub async fn partners<'_>(
    &'_ self,
    search: Option<String>,
    limit: Option<u64>
) -> Result<Vec<Partner>, Error>
[src]

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

pub async fn create<'_>(&'_ self, create: CreateShare) -> Result<Uuid, Error>[src]

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

pub async fn update<'_>(&'_ self, update: UpdateShare) -> Result<Uuid, Error>[src]

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

pub async fn delete<'_>(&'_ self, share_id: Uuid) -> Result<Uuid, Error>[src]

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

pub async fn list<'_>(
    &'_ self,
    details: Option<Details>
) -> Result<Vec<Share>, Error>
[src]

The list action lists all shares with the user as owner or receiver.

Notes

  • This action still works if sharing has been disabled

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

The show action lists the properties of a single share.

Notes

  • This action still works if sharing has been disabled

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

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> !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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.