pub struct Trash {
pub client: Client,
}Available on crate feature
requests only.Fields§
§client: ClientImplementations§
Source§impl Trash
impl Trash
Sourcepub async fn list<'a>(
&'a self,
page: Option<i64>,
page_size: Option<i64>,
) -> Result<(), Error>
pub async fn list<'a>( &'a self, page: Option<i64>, page_size: Option<i64>, ) -> Result<(), Error>
Perform a GET request to /api/trash/.
Parameters:
page: Option<i64>: A page number within the paginated result set.page_size: Option<i64>: Number of results to return per page.
async fn example_trash_list() -> anyhow::Result<()> {
let client = paperless_api_client::Client::new_from_env();
client.trash().list(Some(4 as i64), Some(4 as i64)).await?;
Ok(())
}Sourcepub async fn create<'a>(&'a self, body: &TrashRequest) -> Result<(), Error>
pub async fn create<'a>(&'a self, body: &TrashRequest) -> Result<(), Error>
Perform a POST request to /api/trash/.
async fn example_trash_create() -> anyhow::Result<()> {
let client = paperless_api_client::Client::new_from_env();
client
.trash()
.create(&paperless_api_client::types::TrashRequest {
documents: Some(vec![4 as i64]),
action: paperless_api_client::types::TrashActionEnum::Empty,
})
.await?;
Ok(())
}Trait Implementations§
Auto Trait Implementations§
impl Freeze for Trash
impl !RefUnwindSafe for Trash
impl Send for Trash
impl Sync for Trash
impl Unpin for Trash
impl !UnwindSafe for Trash
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more