Struct GoModuleReplacement
pub struct GoModuleReplacement { /* private fields */ }Expand description
Go module replacement metadata.
Implementations§
§impl GoModuleReplacement
impl GoModuleReplacement
pub const fn new(
old_path: GoModulePath,
new_path: GoModulePath,
) -> GoModuleReplacement
pub const fn new( old_path: GoModulePath, new_path: GoModulePath, ) -> GoModuleReplacement
Creates module replacement metadata.
pub fn with_old_version(self, version: GoModuleVersion) -> GoModuleReplacement
pub fn with_old_version(self, version: GoModuleVersion) -> GoModuleReplacement
Adds the old module version label.
pub fn with_new_version(self, version: GoModuleVersion) -> GoModuleReplacement
pub fn with_new_version(self, version: GoModuleVersion) -> GoModuleReplacement
Adds the replacement module version label.
pub const fn old_path(&self) -> &GoModulePath
pub const fn old_path(&self) -> &GoModulePath
Returns the replaced module path.
pub const fn old_version(&self) -> Option<&GoModuleVersion>
pub const fn old_version(&self) -> Option<&GoModuleVersion>
Returns the replaced module version.
pub const fn new_path(&self) -> &GoModulePath
pub const fn new_path(&self) -> &GoModulePath
Returns the replacement module path.
pub const fn new_version(&self) -> Option<&GoModuleVersion>
pub const fn new_version(&self) -> Option<&GoModuleVersion>
Returns the replacement module version.
Trait Implementations§
§impl Clone for GoModuleReplacement
impl Clone for GoModuleReplacement
§fn clone(&self) -> GoModuleReplacement
fn clone(&self) -> GoModuleReplacement
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for GoModuleReplacement
impl Debug for GoModuleReplacement
§impl PartialEq for GoModuleReplacement
impl PartialEq for GoModuleReplacement
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