Skip to main content

to_port

Function to_port 

Source
pub fn to_port(value: Value, to: PortType) -> Result<Value, ConvertError>
Expand description

value as a value of type to, by the boundary adapter catalog.

A value that already satisfies to (its own type, or a carrier’s bit-stuffed form) and None are returned unchanged. Otherwise the catalog’s adapter from the value’s type to to is applied; one that fails, such as a text that is not a number, is an error, as is a pair of types the catalog has no adapter for.