Struct napchart::api::AsyncClient [−][src]
Asynchronous api client for https://napchart.com
Implementations
impl AsyncClient
[src]
pub async fn get<'a, T: Into<&'a str>>(
&self,
chartid: T
) -> Result<Napchart, ErrorKind>
[src]
&self,
chartid: T
) -> Result<Napchart, ErrorKind>
Asynchronously downloads the napchart with the given id from napchart.com
Uses the https://thumb.napchart.com/api/get endpoint
pub async fn create(&self, chart: &Napchart) -> Result<String, ErrorKind>
[src]
Asynchronously creates a napchart on napchart.com and returns its id
Uses the https://thumb.napchart.com/alt/api/create endpoint
pub async fn create_new(&self, chart: &mut Napchart) -> Result<(), ErrorKind>
[src]
Asynchronously creates a napchart on napchart.com and sets the chartid of the napchart struct to the assigned id
Uses the https://thumb.napchart.com/alt/api/create endpoint
pub async fn get_image<'a, T: Into<&'a str>>(
&self,
chartid: T,
dest: &mut File,
size: (u32, u32),
shape: Option<ChartShape>
) -> Result<(), ErrorKind>
[src]
&self,
chartid: T,
dest: &mut File,
size: (u32, u32),
shape: Option<ChartShape>
) -> Result<(), ErrorKind>
Asynchronously downloads an image representation of a napchart from napchart.com and saves it to the given &mut File
Uses the https://thumb.napchart.com/api/getImage endpoint
Trait Implementations
impl Default for AsyncClient
[src]
Auto Trait Implementations
impl !RefUnwindSafe for AsyncClient
impl Send for AsyncClient
impl Sync for AsyncClient
impl Unpin for AsyncClient
impl !UnwindSafe for AsyncClient
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,