pub struct CommitUploadSessionBuilder {
pub http_client: Option<HttpClientRef>,
pub session_id: Option<Uuid>,
pub page_order: Vec<Uuid>,
pub volume: Option<String>,
pub chapter: Option<String>,
pub title: Option<String>,
pub translated_language: Option<Language>,
pub external_url: Option<Url>,
pub publish_at: Option<MangaDexDateTime>,
}
Expand description
Custom request builder to handle nested struct.
Fields§
§http_client: Option<HttpClientRef>
§session_id: Option<Uuid>
§page_order: Vec<Uuid>
Ordered list of Upload Session File IDs.
volume: Option<String>
Nullable
chapter: Option<String>
Nullable
title: Option<String>
Nullable
translated_language: Option<Language>
§external_url: Option<Url>
Must be a URL with “http(s)://”.
Nullable
publish_at: Option<MangaDexDateTime>
Implementations§
Source§impl CommitUploadSessionBuilder
impl CommitUploadSessionBuilder
pub fn new(http_client: HttpClientRef) -> Self
Sourcepub fn session_id(self, session_id: Uuid) -> Self
pub fn session_id(self, session_id: Uuid) -> Self
Specify the upload session ID to commit.
Sourcepub fn page_order(self, page_order: Vec<Uuid>) -> Self
pub fn page_order(self, page_order: Vec<Uuid>) -> Self
Specify the Upload Session File IDs to commit, ordered.
Sourcepub fn add_page(self, page: Uuid) -> Self
pub fn add_page(self, page: Uuid) -> Self
Add an Upload Session File ID to commit, adds to the end of the pageOrder
list.
Sourcepub fn volume(self, volume: Option<String>) -> Self
pub fn volume(self, volume: Option<String>) -> Self
Specify the volume the chapter belongs to.
Nullable
Sourcepub fn chapter(self, chapter: Option<String>) -> Self
pub fn chapter(self, chapter: Option<String>) -> Self
Specify the chapter number the session is for.
Nullable
Sourcepub fn translated_language(self, translated_language: Language) -> Self
pub fn translated_language(self, translated_language: Language) -> Self
Specify the chapter number the session is for.
Nullable
Sourcepub fn external_url(self, external_url: Option<Url>) -> Self
pub fn external_url(self, external_url: Option<Url>) -> Self
Specify the URL where the chapter can be found.
Nullable
This should not be used if chapter has images uploaded to MangaDex.
Sourcepub fn publish_at<DT: Into<MangaDexDateTime>>(self, publish_at: DT) -> Self
pub fn publish_at<DT: Into<MangaDexDateTime>>(self, publish_at: DT) -> Self
Specify the date and time the chapter was originally published at.
Sourcepub fn build(&self) -> Result<CommitUploadSession>
pub fn build(&self) -> Result<CommitUploadSession>
Finalize the changes to the request struct and return the new struct.
Source§impl CommitUploadSessionBuilder
impl CommitUploadSessionBuilder
pub async fn send(&self) -> Result<Limited<ChapterData>>
Trait Implementations§
Source§impl Clone for CommitUploadSessionBuilder
impl Clone for CommitUploadSessionBuilder
Source§fn clone(&self) -> CommitUploadSessionBuilder
fn clone(&self) -> CommitUploadSessionBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CommitUploadSessionBuilder
impl Debug for CommitUploadSessionBuilder
Source§impl Default for CommitUploadSessionBuilder
impl Default for CommitUploadSessionBuilder
Source§fn default() -> CommitUploadSessionBuilder
fn default() -> CommitUploadSessionBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CommitUploadSessionBuilder
impl !RefUnwindSafe for CommitUploadSessionBuilder
impl !Send for CommitUploadSessionBuilder
impl !Sync for CommitUploadSessionBuilder
impl Unpin for CommitUploadSessionBuilder
impl !UnwindSafe for CommitUploadSessionBuilder
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