Skip to main content

PortCollectionAccessorsCommon

Trait PortCollectionAccessorsCommon 

Source
pub trait PortCollectionAccessorsCommon {
    // Required methods
    fn contains_name(&self, name: &str) -> bool;
    fn give_to_bound(
        &self,
        name: &str,
        bound: &mut dyn BindCommons,
    ) -> Result<(), Error>;
    fn give_to_collection(
        &self,
        name: &str,
        other_collection: &mut dyn PortCollection,
        other_name: &str,
    ) -> Result<(), Error>;
    fn give_to_variant(
        &self,
        name: &str,
        variant: &mut PortVariant,
    ) -> Result<(), Error>;
    fn sequence_number(&self, name: &str) -> Result<u32, Error>;
    fn use_from_bound(
        &mut self,
        name: &str,
        bound: &dyn BindCommons,
    ) -> Result<(), Error>;
    fn use_from_collection(
        &mut self,
        name: &str,
        other_collection: &dyn PortCollection,
        other_name: &str,
    ) -> Result<(), Error>;
    fn use_from_variant(
        &mut self,
        name: &str,
        variant: &PortVariant,
    ) -> Result<(), Error>;
}
Expand description

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.

Required Methods§

Source

fn contains_name(&self, name: &str) -> bool

Returns true if ‘name’ is in the port collection, otherwise false.

Source

fn give_to_bound( &self, name: &str, bound: &mut dyn BindCommons, ) -> Result<(), Error>

Connects a port from this collection to the value of another port variant. Type of connection depends on types of both ports.

§Errors
Source

fn give_to_collection( &self, name: &str, other_collection: &mut dyn PortCollection, other_name: &str, ) -> Result<(), Error>

Connects a port from this collection to a port from another collection. Type of connection depends on types of both ports.

§Errors
Source

fn give_to_variant( &self, name: &str, variant: &mut PortVariant, ) -> Result<(), Error>

Connects a port from this collection to the value of another port variant. Type of connection depends on types of both ports.

§Errors
Source

fn sequence_number(&self, name: &str) -> Result<u32, Error>

Returns the change sequence number, a number which

  • starts at 0,
  • can only be incremeted by 1 and
  • wraps around to 1 when exceeding its limits.
§Errors
Source

fn use_from_bound( &mut self, name: &str, bound: &dyn BindCommons, ) -> Result<(), Error>

Connects a port from this collection to the value of another port variant. Type of connection depends on types of both ports.

§Errors
Source

fn use_from_collection( &mut self, name: &str, other_collection: &dyn PortCollection, other_name: &str, ) -> Result<(), Error>

Connects a port from this collection to a port from another collection. Type of connection depends on types of both ports.

§Errors
Source

fn use_from_variant( &mut self, name: &str, variant: &PortVariant, ) -> Result<(), Error>

Connects a port from this collection to the value of another port variant. Type of connection depends on types of both ports.

§Errors

Implementors§