Skip to main content

InPort

Trait InPort 

Source
pub trait InPort<T: AnyPortValue>: PortCommons {
    // Required methods
    fn get(&self) -> impl Future<Output = Result<Option<T>, Error>> + Send;
    fn try_get(&self) -> Result<Option<T>, Error>;
}
Expand description

Read access to the value of a port with the data type T, implemented by In and InOut.

Required Methods§

Source

fn get(&self) -> impl Future<Output = Result<Option<T>, Error>> + Send

Returns a clone of the value, waiting while the value is write locked.

§Errors
Source

fn try_get(&self) -> Result<Option<T>, Error>

Returns a clone of the value without waiting for a write locked value.

§Errors

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: AnyPortValue, D: Readable> InPort<T> for Port<D>