pub struct SingleConnSessionManager<H = GraphTransportResponseHandler>where
H: ResponseHandler,{
pub config: SingleConnSessionConf,
pub transport_config: AsyncTransportConfiguration<H>,
}
Fields§
§config: SingleConnSessionConf
§transport_config: AsyncTransportConfiguration<H>
Implementations§
source§impl<H> SingleConnSessionManager<H>where
H: ResponseHandler,
impl<H> SingleConnSessionManager<H>where
H: ResponseHandler,
pub fn new_with_response_handler( config: SingleConnSessionConf, response_handler: H, ) -> Self
source§impl SingleConnSessionManager
impl SingleConnSessionManager
pub fn new(config: SingleConnSessionConf) -> Self
pub async fn get_session( &self, ) -> Result<SingleConnSession, SingleConnSessionError>
Trait Implementations§
source§impl<H> Clone for SingleConnSessionManager<H>where
H: ResponseHandler + Clone,
impl<H> Clone for SingleConnSessionManager<H>where
H: ResponseHandler + Clone,
source§fn clone(&self) -> SingleConnSessionManager<H>
fn clone(&self) -> SingleConnSessionManager<H>
Returns a copy 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 ManageConnection for SingleConnSessionManager
impl ManageConnection for SingleConnSessionManager
source§type Connection = SingleConnSession
type Connection = SingleConnSession
The connection type this manager deals with.
source§type Error = SingleConnSessionError
type Error = SingleConnSessionError
The error type returned by
Connection
s.source§fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Attempts to create a new connection.
source§fn is_valid<'life0, 'life1, 'async_trait>(
&'life0 self,
_conn: &'life1 mut Self::Connection,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_valid<'life0, 'life1, 'async_trait>(
&'life0 self,
_conn: &'life1 mut Self::Connection,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Determines if the connection is still connected to the database.
source§fn has_broken(&self, conn: &mut Self::Connection) -> bool
fn has_broken(&self, conn: &mut Self::Connection) -> bool
Synchronously determine if the connection is no longer usable, if possible.
Auto Trait Implementations§
impl<H = GraphTransportResponseHandler> !Freeze for SingleConnSessionManager<H>
impl<H> RefUnwindSafe for SingleConnSessionManager<H>where
H: RefUnwindSafe,
impl<H> Send for SingleConnSessionManager<H>where
H: Send,
impl<H> Sync for SingleConnSessionManager<H>where
H: Sync,
impl<H> Unpin for SingleConnSessionManager<H>where
H: Unpin,
impl<H> UnwindSafe for SingleConnSessionManager<H>where
H: UnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)