pub struct Rustup { /* private fields */ }
Expand description
Wrapper around a rustup
executable that existed at least at one point.
Implementations§
source§impl Rustup
impl Rustup
sourcepub fn default() -> Result<Self>
pub fn default() -> Result<Self>
Get rustup
from ${PATH}
, if available.
Returns Err(...)
if rustup --version
fails.
sourcepub fn new(rustup: impl AsRef<OsStr> + Into<OsString>) -> Result<Self>
pub fn new(rustup: impl AsRef<OsStr> + Into<OsString>) -> Result<Self>
Get rustup
from a specific path, if available.
Returns Err(...)
if {rustup} --version
fails.
sourcepub fn new_unchecked(rustup: impl AsRef<OsStr> + Into<OsString>) -> Self
pub fn new_unchecked(rustup: impl AsRef<OsStr> + Into<OsString>) -> Self
Get rustup
from a specific path
sourcepub fn version(&self) -> Version
Available on crate feature version
only.
pub fn version(&self) -> Version
version
only.Parse rustup --version
sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Returns true
if rustup --version
still succeeds
sourcepub fn toolchains(&self) -> RustupToolchains<'_>
pub fn toolchains(&self) -> RustupToolchains<'_>
Toolchains rustup is aware of
Auto Trait Implementations§
impl RefUnwindSafe for Rustup
impl Send for Rustup
impl Sync for Rustup
impl Unpin for Rustup
impl UnwindSafe for Rustup
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