pub struct PostgresCluster { /* private fields */ }Implementations§
Source§impl PostgresCluster
impl PostgresCluster
pub fn new(pool: Pool<PostgresConnectionManager<NoTls>>) -> Self
pub fn with_heartbeat_timeout(self, timeout_seconds: i32) -> Self
pub async fn ensure_schema(&self) -> DistResult<()>
Trait Implementations§
Source§impl Clone for PostgresCluster
impl Clone for PostgresCluster
Source§fn clone(&self) -> PostgresCluster
fn clone(&self) -> PostgresCluster
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PostgresCluster
impl Debug for PostgresCluster
Source§impl DistCluster for PostgresCluster
impl DistCluster for PostgresCluster
fn heartbeat<'life0, 'async_trait>(
&'life0 self,
node_id: NodeId,
state: NodeState,
) -> Pin<Box<dyn Future<Output = DistResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn alive_nodes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DistResult<HashMap<NodeId, NodeState>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for PostgresCluster
impl !RefUnwindSafe for PostgresCluster
impl Send for PostgresCluster
impl Sync for PostgresCluster
impl Unpin for PostgresCluster
impl !UnwindSafe for PostgresCluster
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more