pub struct MysqlTemplate { /* private fields */ }
Expand description
MySQL container template with sensible defaults
Implementations§
Source§impl MysqlTemplate
impl MysqlTemplate
Sourcepub fn root_password(self, password: impl Into<String>) -> Self
pub fn root_password(self, password: impl Into<String>) -> Self
Set root password
Sourcepub fn allow_empty_password(self) -> Self
pub fn allow_empty_password(self) -> Self
Allow empty password for root (development only!)
Sourcepub fn random_root_password(self) -> Self
pub fn random_root_password(self) -> Self
Set random root password
Sourcepub fn with_persistence(self, volume_name: impl Into<String>) -> Self
pub fn with_persistence(self, volume_name: impl Into<String>) -> Self
Enable persistence with a volume
Sourcepub fn init_scripts(self, scripts_path: impl Into<String>) -> Self
pub fn init_scripts(self, scripts_path: impl Into<String>) -> Self
Mount initialization scripts directory
Sourcepub fn config_file(self, config_path: impl Into<String>) -> Self
pub fn config_file(self, config_path: impl Into<String>) -> Self
Mount custom MySQL configuration
Sourcepub fn memory_limit(self, limit: impl Into<String>) -> Self
pub fn memory_limit(self, limit: impl Into<String>) -> Self
Set memory limit for MySQL
Sourcepub fn character_set(self, charset: impl Into<String>) -> Self
pub fn character_set(self, charset: impl Into<String>) -> Self
Set character set
Sourcepub fn auto_remove(self) -> Self
pub fn auto_remove(self) -> Self
Enable auto-remove when stopped
Trait Implementations§
Source§impl Template for MysqlTemplate
impl Template for MysqlTemplate
Source§fn config(&self) -> &TemplateConfig
fn config(&self) -> &TemplateConfig
Get the template configuration
Source§fn config_mut(&mut self) -> &mut TemplateConfig
fn config_mut(&mut self) -> &mut TemplateConfig
Get a mutable reference to the configuration
Source§fn build_command(&self) -> RunCommand
fn build_command(&self) -> RunCommand
Build the RunCommand for this template
Source§fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start the container with this template
Source§fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop the container
Source§fn remove<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Remove the container
Source§fn is_running<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_running<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check if the container is running
Auto Trait Implementations§
impl Freeze for MysqlTemplate
impl RefUnwindSafe for MysqlTemplate
impl Send for MysqlTemplate
impl Sync for MysqlTemplate
impl Unpin for MysqlTemplate
impl UnwindSafe for MysqlTemplate
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