pub trait DdsBackend {
// Required methods
fn create_application(
&mut self,
app_name: &str,
) -> Result<BackendResult, BackendError>;
fn delete_application(
&mut self,
app_name: &str,
) -> Result<BackendResult, BackendError>;
fn list_applications(
&self,
pattern: &str,
) -> Result<BackendResult, BackendError>;
fn create_participant(
&mut self,
app_name: &str,
domain_id: u32,
) -> Result<BackendResult, BackendError>;
fn delete_participant(
&mut self,
app_name: &str,
participant: &str,
) -> Result<BackendResult, BackendError>;
fn create_topic(
&mut self,
app_name: &str,
participant: &str,
topic_name: &str,
type_name: &str,
) -> Result<BackendResult, BackendError>;
fn create_data_writer(
&mut self,
app_name: &str,
participant: &str,
publisher: &str,
topic: &str,
) -> Result<BackendResult, BackendError>;
fn create_data_reader(
&mut self,
app_name: &str,
participant: &str,
subscriber: &str,
topic: &str,
) -> Result<BackendResult, BackendError>;
fn write_sample(
&mut self,
app_name: &str,
participant: &str,
publisher: &str,
writer: &str,
body: &[u8],
) -> Result<BackendResult, BackendError>;
fn read_samples(
&mut self,
app_name: &str,
participant: &str,
subscriber: &str,
reader: &str,
selector: Option<&str>,
) -> Result<BackendResult, BackendError>;
}Expand description
Bridge-Trait — konkrete Backend-Implementation routet diese
Method-Calls auf crates/dcps/-Public-API.
Spec §7.4 fordert genau diese Operationen pro Object-Type (Application/Participant/Topic/Publisher/Subscriber/DataWriter/ DataReader/WaitSet). Wir buendeln sie thematisch.
Required Methods§
Sourcefn create_application(
&mut self,
app_name: &str,
) -> Result<BackendResult, BackendError>
fn create_application( &mut self, app_name: &str, ) -> Result<BackendResult, BackendError>
POST /dds/rest1/applications — create_application.
§Errors
Conflict wenn Application-Name bereits existiert.