pub struct ChannelConnection<E> { /* private fields */ }Expand description
A running chat adapter: its connection to the platform, or its webhook’s handing over (spec 3.5 §10 X12). Dropping it stops the adapter.
§Example
use adk_surface::channels::ChannelConnection;
async fn stop<E: std::fmt::Debug>(connection: ChannelConnection<E>) {
connection.stop();
assert!(connection.join().await.is_ok());
}Implementations§
Source§impl<E> ChannelConnection<E>
impl<E> ChannelConnection<E>
Sourcepub fn stop(&self)
pub fn stop(&self)
Stops the adapter. The gateway it was started with is dropped with it, so its replies and cards stop too unless the caller kept a handle.
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Whether the adapter stopped: stopped, or ended by a refused token.
Trait Implementations§
Source§impl<E> Debug for ChannelConnection<E>
impl<E> Debug for ChannelConnection<E>
Source§impl<E> Drop for ChannelConnection<E>
impl<E> Drop for ChannelConnection<E>
Auto Trait Implementations§
impl<E> Forget for ChannelConnection<E>
impl<E> Freeze for ChannelConnection<E>
impl<E> Move for ChannelConnection<E>
impl<E> RefUnwindSafe for ChannelConnection<E>
impl<E> Send for ChannelConnection<E>
impl<E> Sync for ChannelConnection<E>
impl<E> Unpin for ChannelConnection<E>
impl<E> UnsafeUnpin for ChannelConnection<E>
impl<E> UnwindSafe for ChannelConnection<E>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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