Struct sugar_cli::upload::methods::nft_storage::NftStorageMethod
source · pub struct NftStorageMethod { /* private fields */ }Implementations§
source§impl NftStorageMethod
impl NftStorageMethod
sourcepub async fn new(config_data: &ConfigData) -> Result<Self>
pub async fn new(config_data: &ConfigData) -> Result<Self>
Initialize a new NftStorageHandler.
Trait Implementations§
source§impl Prepare for NftStorageMethod
impl Prepare for NftStorageMethod
source§fn prepare<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_sugar_config: &'life1 SugarConfig,
asset_pairs: &'life2 HashMap<isize, AssetPair>,
asset_indices: Vec<(DataType, &'life3 [isize])>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn prepare<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _sugar_config: &'life1 SugarConfig, asset_pairs: &'life2 HashMap<isize, AssetPair>, asset_indices: Vec<(DataType, &'life3 [isize])> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Verifies that no file is larger than 100MB (upload of files larger than 100MB are not currently supported).
source§impl Uploader for NftStorageMethod
impl Uploader for NftStorageMethod
source§fn upload<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_sugar_config: &'life1 SugarConfig,
cache: &'life2 mut Cache,
data_type: DataType,
assets: &'life3 mut Vec<AssetInfo>,
progress: &'life4 ProgressBar,
interrupted: Arc<AtomicBool>
) -> Pin<Box<dyn Future<Output = Result<Vec<UploadError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn upload<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _sugar_config: &'life1 SugarConfig, cache: &'life2 mut Cache, data_type: DataType, assets: &'life3 mut Vec<AssetInfo>, progress: &'life4 ProgressBar, interrupted: Arc<AtomicBool> ) -> Pin<Box<dyn Future<Output = Result<Vec<UploadError>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,
Upload the data to Nft Storage
Auto Trait Implementations§
impl !RefUnwindSafe for NftStorageMethod
impl Send for NftStorageMethod
impl Sync for NftStorageMethod
impl Unpin for NftStorageMethod
impl !UnwindSafe for NftStorageMethod
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more