pub trait PortReader {
// Required methods
fn port(&self, name: &str) -> Option<Value>;
fn as_any(&self) -> &dyn Any;
}Expand description
The optional uniform read accessor a generated native ports struct implements so a consumer
that does not downcast can still read ports by name. Reading a statically-typed field this
way clones/boxes ONLY that one field into a Value on demand (no Vec, no eager boxing of
every port) — a hot-path consumer downcasts (as_any) and reads the typed fields directly.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".