pub enum Engine {
Postgres,
Mysql,
Mariadb,
Mongodb,
Redis,
}Expand description
A database engine.
Variants§
Implementations§
Source§impl Engine
impl Engine
pub fn name(self) -> &'static str
pub fn parse(s: &str) -> Result<Engine>
Sourcepub fn default_version(self) -> &'static str
pub fn default_version(self) -> &'static str
The version a new database gets.
pub fn port(self) -> u16
pub fn data_path(self) -> &'static str
Sourcepub fn has_root_password(self) -> bool
pub fn has_root_password(self) -> bool
Whether a root password is kept beside the user’s.
Sourcepub fn has_database(self) -> bool
pub fn has_database(self) -> bool
Whether the engine has a database name and a user to set.
Sourcepub fn dump_extension(self) -> &'static str
pub fn dump_extension(self) -> &'static str
The extension of a dump’s object (before compression).
Sourcepub fn restores_from(self, from: Engine) -> bool
pub fn restores_from(self, from: Engine) -> bool
Restore a dump of from into this engine?
Sourcepub fn dump_command(self) -> Vec<String>
pub fn dump_command(self) -> Vec<String>
A shell line (run inside the database’s instance, as root, with its environment) that writes a dump to stdout. Credentials come from the instance’s own environment, never from argv the daemon builds.
Sourcepub fn restore_command(self) -> Vec<String>
pub fn restore_command(self) -> Vec<String>
A shell line that restores a dump read from stdin, replacing what
the dump holds. ISB_SOURCE_DB names the dumped database (MongoDB
renames it to this one’s).
Trait Implementations§
impl Copy for Engine
Source§impl<'de> Deserialize<'de> for Engine
impl<'de> Deserialize<'de> for Engine
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Engine
Source§impl Ord for Engine
impl Ord for Engine
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Engine
impl PartialOrd for Engine
impl StructuralPartialEq for Engine
Auto Trait Implementations§
impl Freeze for Engine
impl RefUnwindSafe for Engine
impl Send for Engine
impl Sync for Engine
impl Unpin for Engine
impl UnsafeUnpin for Engine
impl UnwindSafe for Engine
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
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.