Struct mangadex_api::v5::settings::SettingsBuilder
source · [−]pub struct SettingsBuilder {
http_client: HttpClientRef,
}
Expand description
Settings endpoint handler builder.
Fields
http_client: HttpClientRef
Implementations
sourceimpl SettingsBuilder
impl SettingsBuilder
sourcefn create_or_update_user_settings(&self) -> CreateOrUpdateUserSettingsBuilder
fn create_or_update_user_settings(&self) -> CreateOrUpdateUserSettingsBuilder
Create or update a user’s Settings template.
https://api.mangadex.org/swagger.html#/Settings/post-settings
Examples
use mangadex_api::v5::MangaDexClient;
let client = MangaDexClient::default();
let res = client
.settings()
.create_or_update_user_settings()
.build()?
.send()
.await?;
println!("results: {:?}", res);
sourcefn create_template(&self) -> CreateSettingsTemplateBuilder
fn create_template(&self) -> CreateSettingsTemplateBuilder
Create a Settings template.
https://api.mangadex.org/swagger.html#/Settings/post-settings-template
Examples
use mangadex_api::v5::MangaDexClient;
let client = MangaDexClient::default();
let res = client
.settings()
.create_template()
.build()?
.send()
.await?;
println!("results: {:?}", res);
sourcefn get_latest_template(&self) -> GetLatestSettingsTemplateBuilder
fn get_latest_template(&self) -> GetLatestSettingsTemplateBuilder
Get the latest Settings template.
https://api.mangadex.org/swagger.html#/Settings/get-settings-template
Examples
use mangadex_api::v5::MangaDexClient;
use uuid::Uuid;
let client = MangaDexClient::default();
let res = client
.settings()
.get_latest_template()
.build()?
.send()
.await?;
println!("res: {:?}", res);
sourcefn get_template_by_version_id(
&self
) -> GetSettingsTemplateByVersionIdBuilder<'_>
fn get_template_by_version_id(
&self
) -> GetSettingsTemplateByVersionIdBuilder<'_>
Get a Settings template by version ID.
https://api.mangadex.org/swagger.html#/Settings/get-settings-template-version
Examples
use mangadex_api::v5::MangaDexClient;
use uuid::Uuid;
let client = MangaDexClient::default();
let version_id = Uuid::new_v4();
let res = client
.settings()
.get_template_by_version_id()
.version(&version_id)
.build()?
.send()
.await?;
println!("res: {:?}", res);
sourcefn get_user_settings(&self) -> GetUserSettingsBuilder
fn get_user_settings(&self) -> GetUserSettingsBuilder
Get a user’s Settings.
https://api.mangadex.org/swagger.html#/Settings/get-settings
Examples
use mangadex_api::v5::MangaDexClient;
use uuid::Uuid;
let client = MangaDexClient::default();
let version_id = Uuid::new_v4();
let res = client
.settings()
.get_user_settings()
.build()?
.send()
.await?;
println!("res: {:?}", res);
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for SettingsBuilder
impl Send for SettingsBuilder
impl Sync for SettingsBuilder
impl Unpin for SettingsBuilder
impl !UnwindSafe for SettingsBuilder
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> 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