pub struct GoWorkModulePath(/* private fields */);Expand description
Validated go.work module path metadata.
Implementations§
Source§impl GoWorkModulePath
impl GoWorkModulePath
Sourcepub fn new(value: impl AsRef<str>) -> Result<GoWorkModulePath, GoWorkError>
pub fn new(value: impl AsRef<str>) -> Result<GoWorkModulePath, GoWorkError>
Creates workspace module path metadata.
§Errors
Returns GoWorkError when the path is empty or has obvious whitespace/empty segments.
Trait Implementations§
Source§impl AsRef<str> for GoWorkModulePath
impl AsRef<str> for GoWorkModulePath
Source§impl Clone for GoWorkModulePath
impl Clone for GoWorkModulePath
Source§fn clone(&self) -> GoWorkModulePath
fn clone(&self) -> GoWorkModulePath
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 moreSource§impl Debug for GoWorkModulePath
impl Debug for GoWorkModulePath
Source§impl Display for GoWorkModulePath
impl Display for GoWorkModulePath
Source§impl FromStr for GoWorkModulePath
impl FromStr for GoWorkModulePath
Source§type Err = GoWorkError
type Err = GoWorkError
The associated error which can be returned from parsing.
Source§fn from_str(
value: &str,
) -> Result<GoWorkModulePath, <GoWorkModulePath as FromStr>::Err>
fn from_str( value: &str, ) -> Result<GoWorkModulePath, <GoWorkModulePath as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for GoWorkModulePath
impl Hash for GoWorkModulePath
Source§impl Ord for GoWorkModulePath
impl Ord for GoWorkModulePath
Source§fn cmp(&self, other: &GoWorkModulePath) -> Ordering
fn cmp(&self, other: &GoWorkModulePath) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for GoWorkModulePath
impl PartialEq for GoWorkModulePath
Source§impl PartialOrd for GoWorkModulePath
impl PartialOrd for GoWorkModulePath
Source§impl TryFrom<&str> for GoWorkModulePath
impl TryFrom<&str> for GoWorkModulePath
Source§type Error = GoWorkError
type Error = GoWorkError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &str,
) -> Result<GoWorkModulePath, <GoWorkModulePath as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<GoWorkModulePath, <GoWorkModulePath as TryFrom<&str>>::Error>
Performs the conversion.
impl Eq for GoWorkModulePath
impl StructuralPartialEq for GoWorkModulePath
Auto Trait Implementations§
impl Freeze for GoWorkModulePath
impl RefUnwindSafe for GoWorkModulePath
impl Send for GoWorkModulePath
impl Sync for GoWorkModulePath
impl Unpin for GoWorkModulePath
impl UnsafeUnpin for GoWorkModulePath
impl UnwindSafe for GoWorkModulePath
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