pub struct StorageService;Expand description
存储服务
提供统一的存储服务入口
Implementations§
Source§impl StorageService
impl StorageService
Sourcepub fn get_provider(
provider_type: &StorageProviderType,
) -> Box<dyn StorageProvider>
pub fn get_provider( provider_type: &StorageProviderType, ) -> Box<dyn StorageProvider>
根据提供商类型获取对应的存储提供商实例
Sourcepub fn sign_url(path: &str, config: &StorageConfig) -> StorageResult<Url>
pub fn sign_url(path: &str, config: &StorageConfig) -> StorageResult<Url>
获取带签名的访问 URL
Sourcepub fn get_presigned_put_url(
key: &str,
config: &StorageConfig,
) -> StorageResult<Url>
pub fn get_presigned_put_url( key: &str, config: &StorageConfig, ) -> StorageResult<Url>
获取上传预签名 URL
Auto Trait Implementations§
impl Freeze for StorageService
impl RefUnwindSafe for StorageService
impl Send for StorageService
impl Sync for StorageService
impl Unpin for StorageService
impl UnsafeUnpin for StorageService
impl UnwindSafe for StorageService
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