pub struct Config {
pub package_storage_path: PathBuf,
pub robonix_source_path: Option<PathBuf>,
}Fields§
§package_storage_path: PathBuf§robonix_source_path: Option<PathBuf>Absolute path to the cloned robonix repo root (the directory containing rust/).
Set by rbnx setup from inside a working copy. Required so out-of-tree packages
(e.g. mapping_rbnx on a robot) can find capabilities/ and rust/crates/robonix-interfaces/lib.
Implementations§
Source§impl Config
impl Config
pub fn config_file_path() -> Result<PathBuf>
pub fn load() -> Result<Self>
Sourcepub fn require_source_path(&self) -> Result<&Path>
pub fn require_source_path(&self) -> Result<&Path>
Validates that the config has been upgraded for the new rbnx setup flow
(robonix_source_path present + pointing to an existing tree). If not,
prints a migration hint and exits; call this only from subcommands that
actually need source paths. Setup / Config / Path itself are exempt.
pub fn save(&self) -> Result<()>
pub fn default() -> Self
Sourcepub fn resolve_source_path(&self, key: SourcePathKey) -> Result<PathBuf>
pub fn resolve_source_path(&self, key: SourcePathKey) -> Result<PathBuf>
Resolve a well-known path rooted in the robonix source tree.
Returns an error if robonix_source_path is unset (tell user to run rbnx setup)
or if the computed path doesn’t exist.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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 Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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