Skip to main content

SessionClientConnector

Struct SessionClientConnector 

Source
pub struct SessionClientConnector<D, C> { /* private fields */ }
Expand description

Mirrors records to/from a peer reached via the dialer D, speaking codec C, under a logical scheme. A transport crate wraps it in a one-line sugar constructor (e.g. UdsClient).

Implementations§

Source§

impl<D, C> SessionClientConnector<D, C>

Source

pub fn new(dialer: D, codec: C) -> Self

Mirror records over dialer, framing messages with codec. The scheme defaults to "remote".

Source

pub fn scheme(self, scheme: impl Into<String>) -> Self

Override the scheme this connector registers (so <scheme>://<record> links validate and route here).

Source

pub fn with_config(self, config: ClientConfig) -> Self

Override the client engine config (reconnect policy, keepalive, etc.).

Trait Implementations§

Source§

impl<D, C> ConnectorBuilder for SessionClientConnector<D, C>
where D: Dialer + Send + 'static, C: EnvelopeCodec + Clone + 'static,

Source§

fn build<'a>( &'a self, db: &'a AimDb, ) -> Pin<Box<dyn Future<Output = DbResult<Vec<Pin<Box<dyn Future<Output = ()> + Send + 'static>>>>> + Send + 'a>>

Build the connector and return its driving futures. Read more
Source§

fn scheme(&self) -> &str

The URL scheme this connector handles Read more
Source§

fn owns_scheme(&self) -> bool

Whether registering a second connector under this scheme is an error. Read more

Auto Trait Implementations§

§

impl<D, C> !Freeze for SessionClientConnector<D, C>

§

impl<D, C> !RefUnwindSafe for SessionClientConnector<D, C>

§

impl<D, C> Send for SessionClientConnector<D, C>
where OneShot<D>: Send, C: Send,

§

impl<D, C> Sync for SessionClientConnector<D, C>
where OneShot<D>: Sync, C: Sync,

§

impl<D, C> Unpin for SessionClientConnector<D, C>
where OneShot<D>: Unpin, C: Unpin,

§

impl<D, C> UnsafeUnpin for SessionClientConnector<D, C>

§

impl<D, C> UnwindSafe for SessionClientConnector<D, C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.