Struct pgdo::cluster::resource::ClusterExclusive
source · pub struct ClusterExclusive<'a> { /* private fields */ }Implementations§
source§impl<'a> ClusterExclusive<'a>
impl<'a> ClusterExclusive<'a>
When you have exclusive control of a cluster, you can start, stop, destroy, reconfigure it – anything.
pub fn start(&self, options: Options<'_>) -> Result<State, ClusterError>
pub fn stop(&self) -> Result<State, ClusterError>
pub fn destroy(&self) -> Result<State, ClusterError>
pub fn exists(&self) -> Result<bool, ClusterError>
pub fn running(&self) -> Result<bool, ClusterError>
sourcepub fn pool(&self, database: Option<&str>) -> Result<PgPool, ClusterError>
pub fn pool(&self, database: Option<&str>) -> Result<PgPool, ClusterError>
Forwards to Cluster::pool.
sourcepub fn exec<T: AsRef<OsStr>>(
&self,
database: Option<&str>,
command: T,
args: &[T]
) -> Result<ExitStatus, ClusterError>
pub fn exec<T: AsRef<OsStr>>( &self, database: Option<&str>, command: T, args: &[T] ) -> Result<ExitStatus, ClusterError>
Forwards to Cluster::exec.
Auto Trait Implementations§
impl<'a> Freeze for ClusterExclusive<'a>
impl<'a> RefUnwindSafe for ClusterExclusive<'a>
impl<'a> Send for ClusterExclusive<'a>
impl<'a> Sync for ClusterExclusive<'a>
impl<'a> Unpin for ClusterExclusive<'a>
impl<'a> UnwindSafe for ClusterExclusive<'a>
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