pub struct VersionManager { /* private fields */ }
Expand description
Version manager responsible for handling Resolc installation.
Implementations§
Source§impl VersionManager
impl VersionManager
Sourcepub fn is_installed(&self, resolc_version: &Version) -> bool
pub fn is_installed(&self, resolc_version: &Version) -> bool
checks whether the requested resolc binary version is installed already
§Arguments
resolc_version
- required Resolc version
Sourcepub fn get(
&self,
resolc_version: &Version,
solc_version: Option<Version>,
) -> Result<Binary, Error>
pub fn get( &self, resolc_version: &Version, solc_version: Option<Version>, ) -> Result<Binary, Error>
Returns an already present Resolc binary
§Arguments
resolc_version
- required Resolc versionsolc_version
- optionalsolc
version requirement, passing this will also check the compatibility between the two compiler versions
Sourcepub fn get_or_install(
&self,
resolc_version: &Version,
solc_version: Option<Version>,
) -> Result<Binary, Error>
pub fn get_or_install( &self, resolc_version: &Version, solc_version: Option<Version>, ) -> Result<Binary, Error>
Returns an already present binary or installs the requested Resolc version
§Arguments
resolc_version
- required Resolc versionsolc_version
- optionalsolc
version requirement, passing this will also check the compatibility between the two compiler versions
Sourcepub fn remove(&self, version: &Version) -> Result<(), Error>
pub fn remove(&self, version: &Version) -> Result<(), Error>
Uninstall the listed version if it exists in path
Sourcepub fn get_default(&self) -> Result<Binary, Error>
pub fn get_default(&self) -> Result<Binary, Error>
Returns the version used by default
Auto Trait Implementations§
impl Freeze for VersionManager
impl !RefUnwindSafe for VersionManager
impl !Send for VersionManager
impl !Sync for VersionManager
impl Unpin 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