pub struct TCPTransport<C: MakeConnection> { /* private fields */ }Expand description
Implements connecting to Twitch chat via secured or unsecured plain IRC connection.
Trait Implementations§
Source§impl<C: MakeConnection> Debug for TCPTransport<C>
impl<C: MakeConnection> Debug for TCPTransport<C>
Source§impl<C: MakeConnection> Transport for TCPTransport<C>
impl<C: MakeConnection> Transport for TCPTransport<C>
Source§type ConnectError = TCPTransportConnectError
type ConnectError = TCPTransportConnectError
Error type for creating a new connection via
new()Source§type IncomingError = Error
type IncomingError = Error
Error type returned from the
Self::Incoming stream type.Source§type OutgoingError = Error
type OutgoingError = Error
Error type returned from the
Self::Outgoing sink type.Source§type Incoming = Box<dyn FusedStream<Item = Result<IRCMessage, Either<Error, IRCParseError>>> + Send + Unpin + Sync>
type Incoming = Box<dyn FusedStream<Item = Result<IRCMessage, Either<Error, IRCParseError>>> + Send + Unpin + Sync>
Type of stream of incoming messages.
Source§type Outgoing = Box<dyn Sink<IRCMessage, Error = <TCPTransport<C> as Transport>::OutgoingError> + Send + Unpin + Sync>
type Outgoing = Box<dyn Sink<IRCMessage, Error = <TCPTransport<C> as Transport>::OutgoingError> + Send + Unpin + Sync>
Type of outgoing messages sink.
Source§fn new<'async_trait>() -> Pin<Box<dyn Future<Output = Result<TCPTransport<C>, TCPTransportConnectError>> + Send + 'async_trait>>
fn new<'async_trait>() -> Pin<Box<dyn Future<Output = Result<TCPTransport<C>, TCPTransportConnectError>> + Send + 'async_trait>>
Try to create and connect a new
Transport of this type. Returns Ok(Self) after
the connection was established successfully.Auto Trait Implementations§
impl<C> Freeze for TCPTransport<C>
impl<C> !RefUnwindSafe for TCPTransport<C>
impl<C> Send for TCPTransport<C>
impl<C> Sync for TCPTransport<C>
impl<C> Unpin for TCPTransport<C>
impl<C> !UnwindSafe for TCPTransport<C>
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> 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