Struct overclock::core::AbortableBoundedHandle
source · pub struct AbortableBoundedHandle<T> { /* private fields */ }
Expand description
Abortable bounded handle
Implementations§
source§impl<T> AbortableBoundedHandle<T>
impl<T> AbortableBoundedHandle<T>
sourcepub fn new(sender: BoundedHandle<T>) -> Self
pub fn new(sender: BoundedHandle<T>) -> Self
Crete new abortable bounded handle
sourcepub fn send_after(
&self,
message: T,
duration: Duration
) -> JoinHandle<Result<(), SendError<T>>>where
T: Send + 'static,
pub fn send_after( &self, message: T, duration: Duration ) -> JoinHandle<Result<(), SendError<T>>>where T: Send + 'static,
Send message to the channel after the duration pass
sourcepub fn try_send(&self, message: T) -> Result<(), TrySendError<T>>
pub fn try_send(&self, message: T) -> Result<(), TrySendError<T>>
Attempts to send message to the channel
sourcepub fn same_channel(&self, other: &Self) -> bool
pub fn same_channel(&self, other: &Self) -> bool
Returns true if the handle belongs to same channel
Trait Implementations§
source§impl<T> Clone for AbortableBoundedHandle<T>
impl<T> Clone for AbortableBoundedHandle<T>
source§impl<T: Debug> Debug for AbortableBoundedHandle<T>
impl<T: Debug> Debug for AbortableBoundedHandle<T>
source§impl<M: 'static + Send, E> Route<M> for AbortableBoundedHandle<E>where
E: TryFrom<M> + Send,
E::Error: Send,
impl<M: 'static + Send, E> Route<M> for AbortableBoundedHandle<E>where E: TryFrom<M> + Send, E::Error: Send,
source§impl<E: Send + 'static> Shutdown for AbortableBoundedHandle<E>
impl<E: Send + 'static> Shutdown for AbortableBoundedHandle<E>
source§impl<A: Send + 'static, T: ServiceEvent<A>> SupHandle<A> for AbortableBoundedHandle<T>
impl<A: Send + 'static, T: ServiceEvent<A>> SupHandle<A> for AbortableBoundedHandle<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for AbortableBoundedHandle<T>
impl<T> Send for AbortableBoundedHandle<T>where T: Send,
impl<T> Sync for AbortableBoundedHandle<T>where T: Send,
impl<T> Unpin for AbortableBoundedHandle<T>
impl<T> !UnwindSafe for AbortableBoundedHandle<T>
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<E, T, const C: usize> ChannelBuilder<AbortableBoundedChannel<E, C>> for Twhere
E: Send + 'static,
T: Send,
impl<E, T, const C: usize> ChannelBuilder<AbortableBoundedChannel<E, C>> for Twhere E: Send + 'static, T: Send,
source§fn build_channel<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<AbortableBoundedChannel<E, C>, ActorError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait,
fn build_channel<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<AbortableBoundedChannel<E, C>, ActorError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait,
Implement how to build the channel for the corresponding actor
source§impl<E, T> ChannelBuilder<AbortableUnboundedChannel<E>> for Twhere
E: Send + 'static,
T: Send,
impl<E, T> ChannelBuilder<AbortableUnboundedChannel<E>> for Twhere E: Send + 'static, T: Send,
source§fn build_channel<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<AbortableUnboundedChannel<E>, ActorError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait,
fn build_channel<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<AbortableUnboundedChannel<E>, ActorError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait,
Implement how to build the channel for the corresponding actor
source§impl<E, T, const C: usize> ChannelBuilder<BoundedChannel<E, C>> for Twhere
E: ShutdownEvent + 'static,
T: Send,
impl<E, T, const C: usize> ChannelBuilder<BoundedChannel<E, C>> for Twhere E: ShutdownEvent + 'static, T: Send,
source§fn build_channel<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<BoundedChannel<E, C>, ActorError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait,
fn build_channel<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<BoundedChannel<E, C>, ActorError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait,
Implement how to build the channel for the corresponding actor
source§impl<T, const I: u64> ChannelBuilder<IntervalChannel<I>> for Twhere
T: Send,
impl<T, const I: u64> ChannelBuilder<IntervalChannel<I>> for Twhere T: Send,
source§fn build_channel<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<IntervalChannel<I>, ActorError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait,
fn build_channel<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<IntervalChannel<I>, ActorError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait,
Implement how to build the channel for the corresponding actor
source§impl<T, C, B> ChannelBuilder<Marker<C, B>> for Twhere
B: Send + 'static + Sync,
T: Send + ChannelBuilder<C>,
C: Channel,
impl<T, C, B> ChannelBuilder<Marker<C, B>> for Twhere B: Send + 'static + Sync, T: Send + ChannelBuilder<C>, C: Channel,
source§impl<T> ChannelBuilder<NullChannel> for Twhere
T: Send,
impl<T> ChannelBuilder<NullChannel> for Twhere T: Send,
source§fn build_channel<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<NullChannel, ActorError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait,
fn build_channel<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<NullChannel, ActorError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait,
Implement how to build the channel for the corresponding actor
source§impl<E, T> ChannelBuilder<UnboundedChannel<E>> for Twhere
E: ShutdownEvent + 'static,
T: Send,
impl<E, T> ChannelBuilder<UnboundedChannel<E>> for Twhere E: ShutdownEvent + 'static, T: Send,
source§fn build_channel<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<UnboundedChannel<E>, ActorError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait,
fn build_channel<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<UnboundedChannel<E>, ActorError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait,
Implement how to build the channel for the corresponding actor