Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Fundamental traits as concepts #11

Description

@HartmannNico

The fundamental API types are realized as traits. Because each of the traits will require an implementation for a specific library realization later naming confusion is likely to happen.

pub trait RuntimeBuilder<B>: Builder<B>

Proposal:

All communcation traits (Runtime, Producer, Consumer, Publisher, Subscriber, Sample*, ...) locate into a concepts module and have Concept added to their name:

  • Runtime becomes RuntimeConcept
  • SampleMaybeUninit becomes SampleMaybeUninitConcept
  • etc.

All implementations of the concepts are in another module adapter.

Advantage:

The later implementation can also reside in a module, and hold the concrete types:

pub mod adapter {
   pub mod prelude {
      pub use lola::SampleMaybeUninit;  // here we can switch the default adapter implementation
   }

   pub mod lola {

      pub type SampleMaybeUninit { /* LoLa stuff */ }

      impl SampleMaybeUninitConcept for SampleMaybeUninit { /* LoLa stuff */ }
   }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions