pub struct GoModuleReplacement { /* private fields */ }Expand description
Go module replacement metadata.
Implementations§
Source§impl GoModuleReplacement
impl GoModuleReplacement
Sourcepub const fn new(old_path: GoModulePath, new_path: GoModulePath) -> Self
pub const fn new(old_path: GoModulePath, new_path: GoModulePath) -> Self
Creates module replacement metadata.
Sourcepub fn with_old_version(self, version: GoModuleVersion) -> Self
pub fn with_old_version(self, version: GoModuleVersion) -> Self
Adds the old module version label.
Sourcepub fn with_new_version(self, version: GoModuleVersion) -> Self
pub fn with_new_version(self, version: GoModuleVersion) -> Self
Adds the replacement module version label.
Sourcepub const fn old_path(&self) -> &GoModulePath
pub const fn old_path(&self) -> &GoModulePath
Returns the replaced module path.
Sourcepub const fn old_version(&self) -> Option<&GoModuleVersion>
pub const fn old_version(&self) -> Option<&GoModuleVersion>
Returns the replaced module version.
Sourcepub const fn new_path(&self) -> &GoModulePath
pub const fn new_path(&self) -> &GoModulePath
Returns the replacement module path.
Sourcepub const fn new_version(&self) -> Option<&GoModuleVersion>
pub const fn new_version(&self) -> Option<&GoModuleVersion>
Returns the replacement module version.
Trait Implementations§
Source§impl Clone for GoModuleReplacement
impl Clone for GoModuleReplacement
Source§fn clone(&self) -> GoModuleReplacement
fn clone(&self) -> GoModuleReplacement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GoModuleReplacement
impl Debug for GoModuleReplacement
Source§impl PartialEq for GoModuleReplacement
impl PartialEq for GoModuleReplacement
Source§fn eq(&self, other: &GoModuleReplacement) -> bool
fn eq(&self, other: &GoModuleReplacement) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for GoModuleReplacement
impl StructuralPartialEq for GoModuleReplacement
Auto Trait Implementations§
impl Freeze for GoModuleReplacement
impl RefUnwindSafe for GoModuleReplacement
impl Send for GoModuleReplacement
impl Sync for GoModuleReplacement
impl Unpin for GoModuleReplacement
impl UnsafeUnpin for GoModuleReplacement
impl UnwindSafe for GoModuleReplacement
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