pub trait Download: Assets + Links + Href + Serialize + Clone {
    // Provided method
    fn download<'async_trait>(
        self,
        directory: impl 'async_trait + AsRef<Path>
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + 'async_trait>>
       where Self: Sized + 'async_trait { ... }
}
Expand description

Download the assets from anything that implements Assets.

Provided Methods§

source

fn download<'async_trait>( self, directory: impl 'async_trait + AsRef<Path> ) -> Pin<Box<dyn Future<Output = Result<Self>> + 'async_trait>>where Self: Sized + 'async_trait,

Download the assets, and the object itself, to a directory on the local filesystem.

Examples

Item implements Download:

use stac::{Item, Links};
use stac_async::Download;

let item: Item = stac::read("data/simple-item.json").unwrap();
let downloaded_item = item.download("outdir").await.unwrap();

Implementations on Foreign Types§

source§

impl Download for Collection

source§

impl Download for Item

Implementors§