Skip to main content

PutPort

Type Alias PutPort 

Source
pub type PutPort<T> = Port<dyn PutIf<T>>;
Expand description

A port that puts items into something it does not own.

Aliased Type§

pub struct PutPort<T> { /* private fields */ }

Implementations§

Source§

impl<T: 'static> PutPort<T>

Source

pub async fn put(&self, item: T)

Block until the far end has room, then hand the item over.

Source

pub fn try_put(&self, item: T) -> Result<(), T>

Hand the item over only if it fits right now.

Source

pub fn can_put(&self) -> bool