[][src]Struct postgresfixture::Cluster

pub struct Cluster { /* fields omitted */ }

Methods

impl Cluster[src]

pub fn new<P: AsRef<Path>>(datadir: P, runtime: Runtime) -> Self[src]

pub fn exists(&self) -> bool[src]

pub fn running(&self) -> Result<bool, ClusterError>[src]

Check if this cluster is running.

Tries to distinguish carefully between "definitely running", "definitely not running", and "don't know". The latter results in ClusterError.

pub fn pidfile(&self) -> PathBuf[src]

Return the path to the PID file used in this cluster.

The PID file does not necessarily exist.

pub fn logfile(&self) -> PathBuf[src]

Return the path to the log file used in this cluster.

The log file does not necessarily exist.

pub fn create(&self) -> Result<bool, ClusterError>[src]

Create the cluster if it does not already exist.

pub fn start(&self) -> Result<bool, ClusterError>[src]

pub fn connect(&self, database: &str) -> Result<Client, ClusterError>[src]

pub fn shell(&self, database: &str) -> Result<ExitStatus, ClusterError>[src]

pub fn databases(&self) -> Result<Vec<String>, ClusterError>[src]

pub fn createdb(&self, database: &str) -> Result<bool, ClusterError>[src]

Create the named database.

pub fn dropdb(&self, database: &str) -> Result<bool, ClusterError>[src]

Drop the named database.

pub fn stop(&self) -> Result<bool, ClusterError>[src]

pub fn destroy(&self) -> Result<bool, ClusterError>[src]

Auto Trait Implementations

impl RefUnwindSafe for Cluster

impl Send for Cluster

impl Sync for Cluster

impl Unpin for Cluster

impl UnwindSafe for Cluster

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,