pub struct CommitUploadSessionBuilder<'a> {
pub(crate) http_client: HttpClientRef,
pub session_id: Option<&'a Uuid>,
pub page_order: Vec<Uuid>,
pub volume: Option<&'a str>,
pub chapter: Option<&'a str>,
pub title: Option<&'a str>,
pub translated_language: Option<Language>,
pub external_url: Option<&'a Url>,
pub publish_at: Option<MangaDexDateTime>,
}Expand description
Custom request builder to handle nested struct.
Fields§
§http_client: HttpClientRef§session_id: Option<&'a Uuid>§page_order: Vec<Uuid>Ordered list of Upload Session File IDs.
volume: Option<&'a str>Nullable
chapter: Option<&'a str>Nullable
title: Option<&'a str>Nullable
translated_language: Option<Language>§external_url: Option<&'a Url>Must be a URL with “http(s)://”.
Nullable
publish_at: Option<MangaDexDateTime>Implementations§
Source§impl<'a> CommitUploadSessionBuilder<'a>
impl<'a> CommitUploadSessionBuilder<'a>
pub fn new(http_client: HttpClientRef) -> Self
Sourcepub fn session_id(self, session_id: &'a Uuid) -> Self
pub fn session_id(self, session_id: &'a 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<&'a str>) -> Self
pub fn volume(self, volume: Option<&'a str>) -> Self
Specify the volume the chapter belongs to.
Nullable
Sourcepub fn chapter(self, chapter: Option<&'a str>) -> Self
pub fn chapter(self, chapter: Option<&'a str>) -> 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<&'a Url>) -> Self
pub fn external_url(self, external_url: Option<&'a 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<'a>>
pub fn build(self) -> Result<CommitUploadSession<'a>>
Finalize the changes to the request struct and return the new struct.
Trait Implementations§
Source§impl<'a> Clone for CommitUploadSessionBuilder<'a>
impl<'a> Clone for CommitUploadSessionBuilder<'a>
Source§fn clone(&self) -> CommitUploadSessionBuilder<'a>
fn clone(&self) -> CommitUploadSessionBuilder<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for CommitUploadSessionBuilder<'a>
impl<'a> Debug for CommitUploadSessionBuilder<'a>
Source§impl<'a> Default for CommitUploadSessionBuilder<'a>
impl<'a> Default for CommitUploadSessionBuilder<'a>
Source§fn default() -> CommitUploadSessionBuilder<'a>
fn default() -> CommitUploadSessionBuilder<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CommitUploadSessionBuilder<'a>
impl<'a> !Send for CommitUploadSessionBuilder<'a>
impl<'a> !Sync for CommitUploadSessionBuilder<'a>
impl<'a> !UnwindSafe for CommitUploadSessionBuilder<'a>
impl<'a> Freeze for CommitUploadSessionBuilder<'a>
impl<'a> Unpin for CommitUploadSessionBuilder<'a>
impl<'a> UnsafeUnpin for CommitUploadSessionBuilder<'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