dis-rs 0.13.0

An implementation of the Distributed Interactive Simulation protocol (IEEE-1278.1) in Rust. This main crate contains PDU implementations and facilities to read/write PDUs from Rust data structures to the wire format and vice versa. It supports versions 6 and 7 of the protocol.
Documentation
use crate::common::model::EntityId;
use crate::enumerations::RepairCompleteRepair;
use crate::repair_complete::model::RepairComplete;

pub struct RepairCompleteBuilder(RepairComplete);

impl Default for RepairCompleteBuilder {
    fn default() -> Self {
        Self::new()
    }
}

impl RepairCompleteBuilder {
    #[must_use]
    pub fn new() -> Self {
        RepairCompleteBuilder(RepairComplete::default())
    }

    #[must_use]
    pub fn new_from_body(body: RepairComplete) -> Self {
        RepairCompleteBuilder(body)
    }

    #[must_use]
    pub fn build(self) -> RepairComplete {
        self.0
    }

    #[must_use]
    pub fn with_receiving_id(mut self, receiving_id: EntityId) -> Self {
        self.0.receiving_id = receiving_id;
        self
    }

    #[must_use]
    pub fn with_repairing_id(mut self, repairing_id: EntityId) -> Self {
        self.0.repairing_id = repairing_id;
        self
    }

    #[must_use]
    pub fn with_repair(mut self, repair: RepairCompleteRepair) -> Self {
        self.0.repair = repair;
        self
    }
}