Skip to main content

Session

Struct Session 

Source
pub struct Session<'d> { /* private fields */ }

Implementations§

Source§

impl<'d> Session<'d>

Source

pub fn new(port: &'d Port<'d>) -> Self

Trait Implementations§

Source§

impl<'d> Session<'d> for Session<'d>

Source§

type Codec = Codec

Source§

type ConnState = ConnState

Source§

type Send = Lease<'d>

Source§

fn connect(&mut self, ctx: &mut Ctx<'_, 'd, Self>)

Source§

fn response(&mut self, head: Head, ctx: &mut Ctx<'_, 'd, Self>)

Source§

fn disconnect(&mut self, ctx: &mut Ctx<'_, 'd, Self>)

Source§

fn pre_park(&mut self)

Source§

fn idle(&self) -> Idle

Source§

fn codec(&self) -> &Self::Codec

Source§

fn activate(&self, token: Token, ready: ReadyKey<'d>)

Source§

fn drain_requests( &self, token: Token, push: impl FnMut(Self::Send) -> Result<(), Self::Send>, ) -> Requests

Source§

fn flush_trailer(&mut self, ctx: &mut Ctx<'_, 'd, Self>)

Source§

fn sent(&self, token: Token, sent: usize)

Source§

fn defer_close(&self, token: Token, state: &Self::ConnState) -> bool

Source§

fn is_drained(&self, token: Token, state: &Self::ConnState) -> bool

Source§

fn inbound_idle_timeout(&self) -> Option<Duration>

Inbound-idle liveness bound (see ConnApp::inbound_idle_timeout). A protocol sets this to just over its keepalive cadence — e.g. AMQP returns 2 × the negotiated heartbeat once the handshake fixes the interval — so the connector force-reconnects a silently vanished peer. None disables.

Auto Trait Implementations§

§

impl<'d> !RefUnwindSafe for Session<'d>

§

impl<'d> !Send for Session<'d>

§

impl<'d> !Sync for Session<'d>

§

impl<'d> !UnwindSafe for Session<'d>

§

impl<'d> Freeze for Session<'d>

§

impl<'d> Unpin for Session<'d>

§

impl<'d> UnsafeUnpin for Session<'d>

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.