pub struct SystemConfig {
pub motors: FnvIndexMap<String<32>, MotorConfig, 8>,
pub trajectories: FnvIndexMap<String<32>, TrajectoryConfig, 64>,
pub sequences: FnvIndexMap<String<32>, WaypointTrajectory, 16>,
}Expand description
Root configuration structure from TOML.
Fields§
§motors: FnvIndexMap<String<32>, MotorConfig, 8>Named motor configurations.
trajectories: FnvIndexMap<String<32>, TrajectoryConfig, 64>Named trajectory configurations.
sequences: FnvIndexMap<String<32>, WaypointTrajectory, 16>Named waypoint trajectories (sequences).
Implementations§
Source§impl SystemConfig
impl SystemConfig
Sourcepub fn motor(&self, name: &str) -> Option<&MotorConfig>
pub fn motor(&self, name: &str) -> Option<&MotorConfig>
Get a motor configuration by name.
Sourcepub fn trajectory(&self, name: &str) -> Option<&TrajectoryConfig>
pub fn trajectory(&self, name: &str) -> Option<&TrajectoryConfig>
Get a trajectory configuration by name.
Sourcepub fn sequence(&self, name: &str) -> Option<&WaypointTrajectory>
pub fn sequence(&self, name: &str) -> Option<&WaypointTrajectory>
Get a waypoint trajectory by name.
Sourcepub fn motor_names(&self) -> impl Iterator<Item = &str>
pub fn motor_names(&self) -> impl Iterator<Item = &str>
List all motor names.
Sourcepub fn trajectory_names(&self) -> impl Iterator<Item = &str>
pub fn trajectory_names(&self) -> impl Iterator<Item = &str>
List all trajectory names.
Sourcepub fn sequence_names(&self) -> impl Iterator<Item = &str>
pub fn sequence_names(&self) -> impl Iterator<Item = &str>
List all sequence names.
Trait Implementations§
Source§impl Clone for SystemConfig
impl Clone for SystemConfig
Source§fn clone(&self) -> SystemConfig
fn clone(&self) -> SystemConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SystemConfig
impl Debug for SystemConfig
Source§impl Default for SystemConfig
impl Default for SystemConfig
Source§impl<'de> Deserialize<'de> for SystemConfig
impl<'de> Deserialize<'de> for SystemConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SystemConfig
impl RefUnwindSafe for SystemConfig
impl Send for SystemConfig
impl Sync for SystemConfig
impl Unpin for SystemConfig
impl UnwindSafe for SystemConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more