[−][src]Struct d3_core::machine_impl::Sender
Wrap the crossbeam sender to allow the executor to handle a block. This requires that a send which would block, parks the send. It also requires that prior to sending a check is made to determine if the sender is already blocked. What makes this work is that the repeat send is bound to the executor. Consequently, TLS data can be inspected to determine if we need to not complete the send.
Otherwise, the Sender is a wrapper aruond the Crossbeam sender. It intentionally limits the surface of the sender. Much of this is just boilerplate wrapping
Fields
sender: Sender<T>
Implementations
impl<T> Sender<T> where
T: MachineImpl,
[src]
T: MachineImpl,
pub fn get_id(&self) -> usize
[src]
pub fn bind(&mut self, recevier_machine: Weak<MachineAdapter>)
[src]
pub fn try_send(&self, msg: T) -> Result<(), TrySendError<T>>
[src]
pub fn sender(&self) -> Sender<T>
[src]
pub fn send(&self, msg: T) -> Result<(), SendError<T>> where
T: MachineImpl + MachineImpl<InstructionSet = T> + Debug,
[src]
T: MachineImpl + MachineImpl<InstructionSet = T> + Debug,
pub fn send_timeout(
&self,
msg: T,
timeout: Duration
) -> Result<(), SendTimeoutError<T>>
[src]
&self,
msg: T,
timeout: Duration
) -> Result<(), SendTimeoutError<T>>
pub fn is_full(&self) -> bool
[src]
pub fn len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn capacity(&self) -> Option<usize>
[src]
Trait Implementations
impl<T> Clone for Sender<T> where
T: MachineImpl,
[src]
T: MachineImpl,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Debug for Sender<T> where
T: MachineImpl,
[src]
T: MachineImpl,
impl<T> Drop for Sender<T> where
T: MachineImpl,
[src]
T: MachineImpl,
impl<T> Eq for Sender<T> where
T: MachineImpl,
[src]
T: MachineImpl,
impl<T> PartialEq<Sender<T>> for Sender<T> where
T: MachineImpl,
[src]
T: MachineImpl,
Auto Trait Implementations
impl<T> !RefUnwindSafe for Sender<T>
impl<T> Send for Sender<T>
impl<T> Sync for Sender<T>
impl<T> Unpin for Sender<T>
impl<T> !UnwindSafe for Sender<T>
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,
pub fn borrow_mut(&mut self) -> &mut T
[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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub 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>,