pub trait AdapterContext: Send {
// Required methods
fn get_platform_id(
&self,
slug: &str,
platform: &str,
) -> Result<Option<String>, Error>;
fn normalize_terms(&self, terms: &[String]) -> Vec<String>;
fn published(&self) -> bool;
fn storage_config(&self) -> Option<&StorageConfig>;
fn theme_id(&self) -> Option<&str>;
fn content_info(&self) -> &ContentInfo;
// Provided methods
fn status_tracker(&self) -> Option<&StatusTracker> { ... }
fn is_dry_run(&self) -> bool { ... }
}Expand description
Context provided by pipeline to adapters.
Required Methods§
fn get_platform_id( &self, slug: &str, platform: &str, ) -> Result<Option<String>, Error>
fn normalize_terms(&self, terms: &[String]) -> Vec<String>
fn published(&self) -> bool
fn storage_config(&self) -> Option<&StorageConfig>
fn theme_id(&self) -> Option<&str>
fn content_info(&self) -> &ContentInfo
Provided Methods§
Sourcefn status_tracker(&self) -> Option<&StatusTracker>
fn status_tracker(&self) -> Option<&StatusTracker>
Get the status tracker for asset upload caching. Per [[RFC-0004:C-UPLOAD-TRACKING]].
Sourcefn is_dry_run(&self) -> bool
fn is_dry_run(&self) -> bool
Whether we’re in dry-run mode. In dry-run mode, asset uploads should be mocked (copied to temp dir) instead of actually uploading to remote storage.