pub struct VersionManager { /* private fields */ }Expand description
Version manager for checking and recommending updates
Implementations§
Source§impl VersionManager
impl VersionManager
Sourcepub async fn check_current(&self) -> Result<RustVersion>
pub async fn check_current(&self) -> Result<RustVersion>
Check current Rust installation
§Errors
Returns an error if rustc is not found or its output cannot be parsed.
Sourcepub async fn get_latest_stable(&self) -> Result<GitHubRelease>
pub async fn get_latest_stable(&self) -> Result<GitHubRelease>
Get latest stable release
§Errors
Returns an error if the GitHub API request fails or the response cannot be parsed.
Sourcepub async fn get_recommendation(&self) -> Result<UpdateRecommendation>
pub async fn get_recommendation(&self) -> Result<UpdateRecommendation>
Get update recommendation
§Errors
Returns an error if the current version cannot be detected or the latest release cannot be fetched from GitHub.
Sourcepub async fn get_recent_releases(
&self,
count: usize,
) -> Result<Vec<GitHubRelease>>
pub async fn get_recent_releases( &self, count: usize, ) -> Result<Vec<GitHubRelease>>
Get multiple recent releases
§Errors
Returns an error if the GitHub API request fails or the response cannot be parsed.
Auto Trait Implementations§
impl Freeze for VersionManager
impl !RefUnwindSafe for VersionManager
impl Send for VersionManager
impl Sync for VersionManager
impl Unpin for VersionManager
impl UnsafeUnpin for VersionManager
impl !UnwindSafe for VersionManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more