pub struct Storage { /* private fields */ }Expand description
Plugin that installs AppStorage.
Implementations§
Source§impl Storage
impl Storage
pub fn new(store: Arc<dyn BlobStore>) -> Self
pub fn local(root: impl Into<PathBuf>) -> Self
pub fn memory() -> Self
pub fn public_url(self, base: impl Into<String>) -> Self
Sourcepub fn from_config(app: &App) -> Result<Self, StorageError>
pub fn from_config(app: &App) -> Result<Self, StorageError>
Build from [storage] on app (after configure) with env overrides for secrets.
Keys: driver, path, public_url, plus env SOVA_STORAGE* / cloud credentials.
Sourcepub fn from_env() -> Result<Self, StorageError>
pub fn from_env() -> Result<Self, StorageError>
Build from SOVA_STORAGE (local | memory | s3 | gcs | azure).
Trait Implementations§
Source§impl Plugin for Storage
impl Plugin for Storage
Source§fn id(&self) -> &'static str
fn id(&self) -> &'static str
Stable plugin identifier used for dependency checks and
crate::App::has_plugin. Read moreSource§fn meta(&self) -> PluginMeta
fn meta(&self) -> PluginMeta
Display name, description, and declared
PluginMeta::sdk version.Auto Trait Implementations§
impl !RefUnwindSafe for Storage
impl !UnwindSafe for Storage
impl Freeze for Storage
impl Send for Storage
impl Sync for Storage
impl Unpin for Storage
impl UnsafeUnpin for Storage
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