pub enum FilesystemDriver {
Local,
Memory,
S3,
}Expand description
Which Filesystem a named disk uses.
use rainier_filesystem::FilesystemDriver;
use rainier_support::Setting;
// R2, MinIO, B2 and Wasabi are all `s3` pointed at a different endpoint.
assert_eq!(FilesystemDriver::parse("s3").unwrap(), FilesystemDriver::S3);Variants§
Local
One directory on this machine.
The default. Survives a restart and not a redeploy, which is the distinction that catches people out on ephemeral hosting.
Memory
In memory, for tests.
S3
S3, and everything that speaks its API: Cloudflare R2, MinIO, Backblaze B2, Wasabi. The difference is the endpoint, not the driver.
Implementations§
Source§impl FilesystemDriver
impl FilesystemDriver
Whether files written by one instance are visible to the others.
Sourcepub fn is_durable(&self) -> bool
pub fn is_durable(&self) -> bool
Whether files survive the machine going away.
false for Local, which is the answer that surprises
people: a container’s disk is not storage.
Trait Implementations§
Source§impl AsRef<str> for FilesystemDriver
impl AsRef<str> for FilesystemDriver
Source§impl Clone for FilesystemDriver
impl Clone for FilesystemDriver
Source§fn clone(&self) -> FilesystemDriver
fn clone(&self) -> FilesystemDriver
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FilesystemDriver
Source§impl Debug for FilesystemDriver
impl Debug for FilesystemDriver
Source§impl Default for FilesystemDriver
impl Default for FilesystemDriver
Source§fn default() -> FilesystemDriver
fn default() -> FilesystemDriver
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FilesystemDriver
impl<'de> Deserialize<'de> for FilesystemDriver
Source§fn deserialize<D>(
deserializer: D,
) -> Result<FilesystemDriver, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<FilesystemDriver, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for FilesystemDriver
impl Display for FilesystemDriver
impl Eq for FilesystemDriver
Source§impl FromStr for FilesystemDriver
impl FromStr for FilesystemDriver
Source§impl Hash for FilesystemDriver
impl Hash for FilesystemDriver
Source§impl PartialEq for FilesystemDriver
impl PartialEq for FilesystemDriver
Source§impl Serialize for FilesystemDriver
impl Serialize for FilesystemDriver
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Setting for FilesystemDriver
impl Setting for FilesystemDriver
Source§const SETTING: &'static str = "filesystem driver"
const SETTING: &'static str = "filesystem driver"
What this setting is called in an error message —
"cache driver". Read moreSource§const ALL: &'static [FilesystemDriver]
const ALL: &'static [FilesystemDriver]
Every variant, in the order they should be listed to a human.
impl StructuralPartialEq for FilesystemDriver
Auto Trait Implementations§
impl Freeze for FilesystemDriver
impl RefUnwindSafe for FilesystemDriver
impl Send for FilesystemDriver
impl Sync for FilesystemDriver
impl Unpin for FilesystemDriver
impl UnsafeUnpin for FilesystemDriver
impl UnwindSafe for FilesystemDriver
Blanket Implementations§
impl<T> Actor for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Event for T
impl<T> Event for T
Source§fn event_name() -> &'static strwhere
Self: Sized,
fn event_name() -> &'static strwhere
Self: Sized,
A human-readable name, used by wildcard listeners and log output.
Always the Rust type path; see the trait docs.
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 moreCreates a shared type from an unshared type.