pub struct RemoteAssetUri { /* private fields */ }Implementations§
Trait Implementations§
Source§impl AssetUri for RemoteAssetUri
impl AssetUri for RemoteAssetUri
fn uri(&self) -> &str
fn reader(&self, _workspace: &Workspace) -> Result<StdReader, FileAdditionError>
Source§fn prepare_asset(
&self,
_workspace: &Workspace,
checksum_override: Option<Sha256Hash>,
) -> Result<Option<Sha256Hash>, FileAdditionError>
fn prepare_asset( &self, _workspace: &Workspace, checksum_override: Option<Sha256Hash>, ) -> Result<Option<Sha256Hash>, FileAdditionError>
Performs the storage work required before recording an asset and returns a verified
checksum when one is available. Read more
fn stored_asset_uri( &self, _workspace: &Workspace, _checksum: &Sha256Hash, ) -> Result<String, FileAdditionError>
fn store_file( &self, _file_addition: &FileAddition, _workspace: &Workspace, ) -> Result<(), FileStoreError>
fn hashed_filename(&self, checksum: &Sha256Hash) -> String
fn suffix(&self) -> Option<String>
Source§fn compression_type(&self) -> CompressionType
fn compression_type(&self) -> CompressionType
Infers compression from the URI suffix without opening or verifying the asset. Read more
fn generate_file_addition_id(
checksum: Option<&Sha256Hash>,
asset_uri: &str,
) -> HashIdwhere
Self: Sized,
fn asset_filename(&self, checksum: &Sha256Hash) -> String
fn asset_relative_path(
workspace: &Workspace,
asset_uri: &Self,
checksum: &Sha256Hash,
) -> Result<String, FileAdditionError>where
Self: Sized,
Auto Trait Implementations§
impl Freeze for RemoteAssetUri
impl RefUnwindSafe for RemoteAssetUri
impl Send for RemoteAssetUri
impl Sync for RemoteAssetUri
impl Unpin for RemoteAssetUri
impl UnsafeUnpin for RemoteAssetUri
impl UnwindSafe for RemoteAssetUri
Blanket Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more