pub struct ChannelConnection<N>where
N: Notification,{ /* private fields */ }Implementations§
Source§impl<N> ChannelConnection<N>where
N: Notification,
impl<N> ChannelConnection<N>where
N: Notification,
pub fn new( name: &'static str, sender: Sender<N>, channel_type: ChannelType, ) -> Self
Sourcepub fn force_close(&self) -> bool
pub fn force_close(&self) -> bool
Close the connection, ignoring the channel type
Trait Implementations§
Source§impl<N> Clone for ChannelConnection<N>where
N: Notification + Clone,
impl<N> Clone for ChannelConnection<N>where
N: Notification + Clone,
Source§fn clone(&self) -> ChannelConnection<N>
fn clone(&self) -> ChannelConnection<N>
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<N> Connection for ChannelConnection<N>where
N: Notification,
impl<N> Connection for ChannelConnection<N>where
N: Notification,
type Notification = N
type Message = N
type Encoding = Unchanged
type Error = Error
fn encoding(&self) -> Self::Encoding
fn into_message( notification: &Self::Notification, _: &Self::Encoding, ) -> Self::Message
fn send<'life0, 'async_trait>(
&'life0 self,
message: Self::Message,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close(&self) -> bool
fn is_closed(&self) -> bool
Source§impl<N> Debug for ChannelConnection<N>where
N: Notification + Debug,
impl<N> Debug for ChannelConnection<N>where
N: Notification + Debug,
Auto Trait Implementations§
impl<N> Freeze for ChannelConnection<N>
impl<N> RefUnwindSafe for ChannelConnection<N>
impl<N> Send for ChannelConnection<N>
impl<N> Sync for ChannelConnection<N>
impl<N> Unpin for ChannelConnection<N>
impl<N> UnwindSafe for ChannelConnection<N>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
Source§impl<T> CastFrom for Twhere
T: Any + 'static,
impl<T> CastFrom for Twhere
T: Any + 'static,
Source§fn ref_any(&self) -> &(dyn Any + 'static)
fn ref_any(&self) -> &(dyn Any + 'static)
Returns a immutable reference to
Any, which is backed by the type implementing this trait.Source§fn mut_any(&mut self) -> &mut (dyn Any + 'static)
fn mut_any(&mut self) -> &mut (dyn Any + 'static)
Returns a mutable reference to
Any, which is backed by the type implementing this trait.Source§impl<T> CastFromSync for T
impl<T> CastFromSync for T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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