pub struct Files<'a> { /* private fields */ }Expand description
/v1/files — metadata + byte I/O.
Implementations§
Source§impl Files<'_>
impl Files<'_>
Sourcepub async fn list(&self) -> Result<Page<StoredFile>>
pub async fn list(&self) -> Result<Page<StoredFile>>
GET /v1/files.
Sourcepub async fn list_with(
&self,
query: &[(&str, &str)],
) -> Result<Page<StoredFile>>
pub async fn list_with( &self, query: &[(&str, &str)], ) -> Result<Page<StoredFile>>
GET /v1/files with query params (limit, source).
Sourcepub async fn upload(
&self,
filename: &str,
bytes: impl Into<Vec<u8>>,
content_type: Option<&str>,
source: Option<&str>,
) -> Result<StoredFile>
pub async fn upload( &self, filename: &str, bytes: impl Into<Vec<u8>>, content_type: Option<&str>, source: Option<&str>, ) -> Result<StoredFile>
POST /v1/files — multipart upload of bytes as the file part
(max 50 MiB daemon-side). source may be upload (default) | api |
workflow_output.
Sourcepub async fn from_data(&self, body: Value) -> Result<StoredFile>
pub async fn from_data(&self, body: Value) -> Result<StoredFile>
POST /v1/files/from-data — export a workflow’s extracted data into a
stored file. Body: {workflow_id, format?, filters?}.
Sourcepub async fn get(&self, id: &str) -> Result<StoredFile>
pub async fn get(&self, id: &str) -> Result<StoredFile>
GET /v1/files/:id — one file’s metadata.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Files<'a>
impl<'a> !UnwindSafe for Files<'a>
impl<'a> Freeze for Files<'a>
impl<'a> Send for Files<'a>
impl<'a> Sync for Files<'a>
impl<'a> Unpin for Files<'a>
impl<'a> UnsafeUnpin for Files<'a>
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