pub struct ToolchainRegistry { /* private fields */ }Expand description
Registry of known toolchains, keyed by name.
Implementations§
Source§impl ToolchainRegistry
impl ToolchainRegistry
Sourcepub fn register(&mut self, toolchain: Toolchain) -> KernelResult<()>
pub fn register(&mut self, toolchain: Toolchain) -> KernelResult<()>
Register a toolchain. Returns an error if a toolchain with the same name is already registered.
Sourcepub fn remove(&mut self, name: &str) -> KernelResult<Toolchain>
pub fn remove(&mut self, name: &str) -> KernelResult<Toolchain>
Remove a toolchain by name. Returns an error if it does not exist.
Sourcepub fn set_default(&mut self, name: &str) -> KernelResult<()>
pub fn set_default(&mut self, name: &str) -> KernelResult<()>
Set the default toolchain by name. The toolchain must already be registered.
Sourcepub fn get_default(&self) -> Option<&Toolchain>
pub fn get_default(&self) -> Option<&Toolchain>
Return a reference to the default toolchain, if one has been set.
Trait Implementations§
Source§impl Clone for ToolchainRegistry
impl Clone for ToolchainRegistry
Source§fn clone(&self) -> ToolchainRegistry
fn clone(&self) -> ToolchainRegistry
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolchainRegistry
impl Debug for ToolchainRegistry
Auto Trait Implementations§
impl Freeze for ToolchainRegistry
impl RefUnwindSafe for ToolchainRegistry
impl Send for ToolchainRegistry
impl Sync for ToolchainRegistry
impl Unpin for ToolchainRegistry
impl UnwindSafe for ToolchainRegistry
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)