Struct mangadex_api::v2::builder::GetChapterBuilder[][src]

pub struct GetChapterBuilder<'a> {
    md_client: &'a MangaDexV2,
    id: Option<ChapterId>,
    hash: Option<String>,
    server: Option<LocationServer>,
    saver: Option<bool>,
    mark_read: Option<bool>,
}

Builder for the /v2/chapter/{id|hash} endpoint.

Fields

md_client: &'a MangaDexV2id: Option<ChapterId>hash: Option<String>server: Option<LocationServer>saver: Option<bool>mark_read: Option<bool>

Implementations

impl<'a> GetChapterBuilder<'a>[src]

pub fn new(md_client: &'a MangaDexV2) -> Self[src]

pub fn chapter_id(&mut self, id: ChapterId) -> &mut Self[src]

Set the numeric chapter ID.

This takes priority over the hash if both are set.

pub fn hash<T: Into<String>>(&mut self, hash: T) -> &mut Self[src]

Set the unique chapter hash ID.

If this and the numeric ID are set, the numeric ID takes priority.

pub fn server(&mut self, server: LocationServer) -> &mut Self[src]

Set this to override location-based server assignment.

pub fn saver(&mut self, saver: bool) -> &mut Self[src]

Use low-quality images to save bandwidth.

Default: false

pub fn mark_read(&mut self, mark_read: bool) -> &mut Self[src]

Mark the chapter as read.

Default: true

pub async fn send(&self) -> Result<ChapterResponseType, GetChapterError>[src]

Send the request to MangaDex with the inputted parameters.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for GetChapterBuilder<'a>

impl<'a> Send for GetChapterBuilder<'a>

impl<'a> Sync for GetChapterBuilder<'a>

impl<'a> Unpin for GetChapterBuilder<'a>

impl<'a> !UnwindSafe for GetChapterBuilder<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.