Skip to main content

PortField

Trait PortField 

Source
pub trait PortField {
    type Iface: ?Sized + 'static;

    // Required methods
    fn slot_any(&self) -> Rc<dyn Any>;
    fn bound(&self) -> bool;
}
Expand description

The bridge between a port field and the generated ComponentNode methods.

The derive sees the field’s type text (PutPort<u32>), not its meaning, so it names the interface as <PutPort<u32> as PortField>::Iface rather than parsing generics out of tokens.

Required Associated Types§

Source

type Iface: ?Sized + 'static

The interface this port demands: dyn PutIf<T>, dyn GetIf<T>, …

Required Methods§

Source

fn slot_any(&self) -> Rc<dyn Any>

The binding cell, erased, so connect can reach it through dyn.

Source

fn bound(&self) -> bool

Has it been connected?

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<I: ?Sized + 'static> PortField for Port<I>

Source§

type Iface = I