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 rotate_command(self, root: bool) -> Vec<String>
pub fn rotate_command(self, root: bool) -> Vec<String>
The command that makes a new password take effect inside a running
database (rotate): the user’s (root: false), or MySQL’s and
MariaDB’s root password. The new value arrives on stdin; the
instance’s environment still holds the old one, which authenticates.
The engines read their password variables only when the data
directory is first made, so without this a new password would lock
the apps out.
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>,
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,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
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
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
key and return true if they are equal.