Trait AbstractSwComponentType

Source
pub trait AbstractSwComponentType: IdentifiableAbstractionElement {
    // Provided methods
    fn instances(&self) -> Vec<ComponentPrototype> { ... }
    fn parent_compositions(&self) -> Vec<CompositionSwComponentType> { ... }
    fn create_r_port<T: AbstractPortInterface>(
        &self,
        name: &str,
        port_interface: &T,
    ) -> Result<RPortPrototype, AutosarAbstractionError> { ... }
    fn create_p_port<T: AbstractPortInterface>(
        &self,
        name: &str,
        port_interface: &T,
    ) -> Result<PPortPrototype, AutosarAbstractionError> { ... }
    fn create_pr_port<T: AbstractPortInterface>(
        &self,
        name: &str,
        port_interface: &T,
    ) -> Result<PRPortPrototype, AutosarAbstractionError> { ... }
    fn ports(&self) -> impl Iterator<Item = PortPrototype> + Send + 'static { ... }
    fn create_port_group(
        &self,
        name: &str,
    ) -> Result<PortGroup, AutosarAbstractionError> { ... }
}
Expand description

The AbstractSwComponentType is the common interface for all types of software components

Provided Methods§

Source

fn instances(&self) -> Vec<ComponentPrototype>

iterator over the instances of the component type

Source

fn parent_compositions(&self) -> Vec<CompositionSwComponentType>

list all compositions containing instances of the component type

Source

fn create_r_port<T: AbstractPortInterface>( &self, name: &str, port_interface: &T, ) -> Result<RPortPrototype, AutosarAbstractionError>

create a new required port with the given name and port interface

Source

fn create_p_port<T: AbstractPortInterface>( &self, name: &str, port_interface: &T, ) -> Result<PPortPrototype, AutosarAbstractionError>

create a new provided port with the given name and port interface

Source

fn create_pr_port<T: AbstractPortInterface>( &self, name: &str, port_interface: &T, ) -> Result<PRPortPrototype, AutosarAbstractionError>

create a new provided required port with the given name and port interface

Source

fn ports(&self) -> impl Iterator<Item = PortPrototype> + Send + 'static

get an iterator over the ports of the component

Source

fn create_port_group( &self, name: &str, ) -> Result<PortGroup, AutosarAbstractionError>

create a new port group

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§