Struct mangadex_api::v5::upload::commit_session::CommitUploadSessionBuilder
source · [−]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
sourceimpl<'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
sourceimpl<'a> Clone for CommitUploadSessionBuilder<'a>
impl<'a> Clone for CommitUploadSessionBuilder<'a>
sourcefn clone(&self) -> CommitUploadSessionBuilder<'a>
fn clone(&self) -> CommitUploadSessionBuilder<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for CommitUploadSessionBuilder<'a>
impl<'a> Debug for CommitUploadSessionBuilder<'a>
sourceimpl<'a> Default for CommitUploadSessionBuilder<'a>
impl<'a> Default for CommitUploadSessionBuilder<'a>
sourcefn default() -> CommitUploadSessionBuilder<'a>
fn default() -> CommitUploadSessionBuilder<'a>
Returns the “default value” for a type. Read more
sourceimpl<'a> Serialize for CommitUploadSessionBuilder<'a>
impl<'a> Serialize for CommitUploadSessionBuilder<'a>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for CommitUploadSessionBuilder<'a>
impl<'a> Send for CommitUploadSessionBuilder<'a>
impl<'a> Sync for CommitUploadSessionBuilder<'a>
impl<'a> Unpin for CommitUploadSessionBuilder<'a>
impl<'a> !UnwindSafe for CommitUploadSessionBuilder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more