pub struct TrajectoryRegistry { /* private fields */ }Expand description
Registry for named trajectories.
Implementations§
Source§impl TrajectoryRegistry
impl TrajectoryRegistry
Sourcepub fn get(&self, name: &str) -> Option<&TrajectoryConfig>
pub fn get(&self, name: &str) -> Option<&TrajectoryConfig>
Get a trajectory by name.
Sourcepub fn get_or_error(&self, name: &str) -> Result<&TrajectoryConfig>
pub fn get_or_error(&self, name: &str) -> Result<&TrajectoryConfig>
Get a trajectory by name, returning an error with available names if not found.
§Errors
Returns TrajectoryError::NotFoundWithNames if the trajectory doesn’t exist,
including a list of available trajectory names for debugging.
Sourcepub fn remove(&mut self, name: &str) -> Option<TrajectoryConfig>
pub fn remove(&mut self, name: &str) -> Option<TrajectoryConfig>
Remove a trajectory by name.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&str, &TrajectoryConfig)>
pub fn iter(&self) -> impl Iterator<Item = (&str, &TrajectoryConfig)>
Get an iterator over trajectories.
Source§impl TrajectoryRegistry
impl TrajectoryRegistry
Sourcepub fn from_config(config: &SystemConfig) -> Self
pub fn from_config(config: &SystemConfig) -> Self
Load trajectories from a SystemConfig.
Trait Implementations§
Source§impl Debug for TrajectoryRegistry
impl Debug for TrajectoryRegistry
Auto Trait Implementations§
impl Freeze for TrajectoryRegistry
impl RefUnwindSafe for TrajectoryRegistry
impl Send for TrajectoryRegistry
impl Sync for TrajectoryRegistry
impl Unpin for TrajectoryRegistry
impl UnwindSafe for TrajectoryRegistry
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