get_paste_async

Function get_paste_async 

Source
pub async fn get_paste_async(id: &str) -> Result<PasteObject, Error>
Expand description

Gets a paste’s data in json format from pastemyst asynchronously. It returns a Result with a PasteObject and error.

§Examples

use pastemyst::paste::get_paste_async;
use pastemyst::paste::PasteResult;

#[tokio::main]
async fn main() -> PasteResult<()> {
    let foo = get_paste_async("hipfqanx").await?;
    println!("{:?}", foo._id);
    Ok(())
}