[−][src]Struct actix::dev::channel::AddressSender
The transmission end of a channel which is used to send values.
This is created by the channel
method.
Methods
impl<A: Actor> AddressSender<A>
[src]
pub fn connected(&self) -> bool
[src]
Is the channel still open
pub fn send<M>(&self, msg: M) -> Result<Receiver<M::Result>, SendError<M>> where
A: Handler<M>,
A::Context: ToEnvelope<A, M>,
M::Result: Send,
M: Message + Send,
[src]
A: Handler<M>,
A::Context: ToEnvelope<A, M>,
M::Result: Send,
M: Message + Send,
Attempts to send a message on this Sender<A>
with blocking.
This function must be called from inside of a task.
pub fn try_send<M>(&self, msg: M, park: bool) -> Result<(), SendError<M>> where
A: Handler<M>,
<A as Actor>::Context: ToEnvelope<A, M>,
M::Result: Send,
M: Message + Send + 'static,
[src]
A: Handler<M>,
<A as Actor>::Context: ToEnvelope<A, M>,
M::Result: Send,
M: Message + Send + 'static,
Attempts to send a message on this Sender<A>
without blocking.
pub fn do_send<M>(&self, msg: M) -> Result<(), SendError<M>> where
A: Handler<M>,
<A as Actor>::Context: ToEnvelope<A, M>,
M::Result: Send,
M: Message + Send,
[src]
A: Handler<M>,
<A as Actor>::Context: ToEnvelope<A, M>,
M::Result: Send,
M: Message + Send,
Send a message on this Sender<A>
without blocking.
This function does not park current task.
pub fn downgrade(&self) -> WeakAddressSender<A>
[src]
Downgrade to WeakAddressSender
which can later be upgraded
Trait Implementations
impl<A: Actor> Clone for AddressSender<A>
[src]
fn clone(&self) -> AddressSender<A>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<A: Actor> Debug for AddressSender<A>
[src]
impl<A: Actor> Drop for AddressSender<A>
[src]
impl<A: Actor> Eq for AddressSender<A>
[src]
impl<A: Actor> Hash for AddressSender<A>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<A: Actor> PartialEq<AddressSender<A>> for AddressSender<A>
[src]
Auto Trait Implementations
impl<A> !RefUnwindSafe for AddressSender<A>
impl<A> Send for AddressSender<A>
impl<A> Sync for AddressSender<A>
impl<A> Unpin for AddressSender<A>
impl<A> !UnwindSafe for AddressSender<A>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
ⓘImportant traits for &'_ mut Ffn borrow_mut(&mut self) -> &mut T
[src]
ⓘImportant traits for &'_ mut F
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,