pub struct PgTransport { /* private fields */ }Implementations§
Source§impl PgTransport
impl PgTransport
Sourcepub fn new(
url: &str,
channel: impl Into<String>,
) -> Result<Self, TransportError>
pub fn new( url: &str, channel: impl Into<String>, ) -> Result<Self, TransportError>
Connection without TLS.
pub fn with_tls<T>(
url: &str,
channel: impl Into<String>,
tls: T,
) -> Result<Self, TransportError>where
T: MakeTlsConnect<Socket> + Clone + Send + Sync + 'static,
T::Stream: Send + 'static,
T::TlsConnect: Send,
<T::TlsConnect as TlsConnect<Socket>>::Future: Send,
pub fn channel(&self) -> &str
Trait Implementations§
Source§impl Transport for PgTransport
impl Transport for PgTransport
fn name(&self) -> &str
fn publish<'life0, 'life1, 'async_trait>(
&'life0 self,
change: &'life1 Change,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn subscribe<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ChangeStream, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ChangeStream, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Opens a stream with the changes published by any instance, including this one.
Ends, or returns an error, when the connection drops; the hub reopens it.
Auto Trait Implementations§
impl !Freeze for PgTransport
impl !RefUnwindSafe for PgTransport
impl !UnwindSafe for PgTransport
impl Forget for PgTransport
impl Move for PgTransport
impl Send for PgTransport
impl Sync for PgTransport
impl Unpin for PgTransport
impl UnsafeUnpin for PgTransport
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