Skip to main content

Crate dataport

Crate dataport 

Source
Expand description

§dataport

SysML v2 like thread-safe port abstractions, distinguishing between in (reader), inout (reader/writer) and out (writer) ports.
It also provides a set of macros to help with creation of ports and port lists.
It supports both std and no_std environments (requires alloc).

§License

Licensed with the fair use “NGMC” license, see license file

§Contribution

Any contribution intentionally submitted for inclusion in the work by you, shall be licensed with the same “NGMC” license, without any additional terms or conditions.

Modules§

prelude
Most commonly used interfaces of dataport.

Macros§

create_inbound_entry
Creates a name/inbound_port pair.
create_inbound_entry_parseable
Creates a name/inbound_port pair with a parseable data type.
create_inoutbound_entry
Creates a name/inoutbound_port pair.
create_inoutbound_entry_parseable
Creates a name/inoutbound_port pair with a parseable data type.
create_outbound_entry
Creates a name/outbound_port pair.
create_outbound_entry_parseable
Creates a name/outbound_port pair with a parseable data type.
create_port_array
Creates an array of ports.
create_port_map
Creates a map of ports.
create_port_vec
Creates a list of ports.

Structs§

BoundValueReadGuard
Read-Locked port value guard. Until this value is dropped, a read lock is held on the ports value.
BoundValueWriteGuard
Write-Locked port value guard. Until this value is dropped, a write lock is held on the ports value.
EmptyPortArray
A thread-safe wrapper for PortArray<0> that allows shared &mut access.
InBound
@TODO:
InOutBound
@TODO:
OutBound
@TODO:
PortArray
A fixed unsorted array of PortVariants.
PortMap
An extendable sorted map of PortVariants.
PortVec
An extendable unsorted list of PortVariants.

Enums§

Error
Port errors.
PortVariant
Implemented set of port variants.

Statics§

EMPTY_PORT_ARRAY
An empty port array to provide a port collection for items without ports which use the traits. Using a single instance reduces memory footprint.

Traits§

AnyPortValue
The AnyPortValue trait allows to use different types of values in ports.
BindCommons
Trait for bind port types.
BindIn
Trait for incoming bind port types.
BindInOut
Trait for incoming and outgoing bind port types.
BindOut
Trait for outgoing bind port types.
PortCollection
Methods for something that is a collection of ports. Each port is identified by its name, so the name has to be unique within a certain port collection.
PortCollectionAccessors
Access methods for port collections. Each port is identified by its name, so the name has to be unique within a certain port collection.
PortCollectionAccessorsCommon
Common access methods for port collections. Each port is identified by its name, so the name has to be unique within a certain port collection.
PortCollectionMut
Methods for something that is a mutable collection of ports. Each port is identified by its name, so the name has to be unique within a certain port collection.
PortCollectionProvider
Trait for something that provides a collection of Ports.
PortCollectionProviderMut
Trait for something that provides a mutable collection of Ports.
PortCommons
PortList
Object safe combination of PortCollection & PortCollectionAccessorsCommon

Functions§

is_port_collection_pointer
Checks whether the given name is a pointer into a port collection.
is_valid_port_name
Returns true if a name is a valid port name, otherwise false. Valid port names

Type Aliases§

Arc
Mutex
RwLock
RwLockReadGuard
RwLockWriteGuard