pub struct GoImportAlias(/* private fields */);Expand description
Validated Go import alias metadata.
Implementations§
Source§impl GoImportAlias
impl GoImportAlias
Sourcepub fn new(value: impl AsRef<str>) -> Result<GoImportAlias, GoImportError>
pub fn new(value: impl AsRef<str>) -> Result<GoImportAlias, GoImportError>
Creates an import alias from _, ., or an ASCII Go identifier.
§Errors
Returns GoImportError when the alias is empty or invalid.
Trait Implementations§
Source§impl AsRef<str> for GoImportAlias
impl AsRef<str> for GoImportAlias
Source§impl Clone for GoImportAlias
impl Clone for GoImportAlias
Source§fn clone(&self) -> GoImportAlias
fn clone(&self) -> GoImportAlias
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 GoImportAlias
impl Debug for GoImportAlias
Source§impl Display for GoImportAlias
impl Display for GoImportAlias
Source§impl FromStr for GoImportAlias
impl FromStr for GoImportAlias
Source§type Err = GoImportError
type Err = GoImportError
The associated error which can be returned from parsing.
Source§fn from_str(
value: &str,
) -> Result<GoImportAlias, <GoImportAlias as FromStr>::Err>
fn from_str( value: &str, ) -> Result<GoImportAlias, <GoImportAlias as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for GoImportAlias
impl Hash for GoImportAlias
Source§impl Ord for GoImportAlias
impl Ord for GoImportAlias
Source§fn cmp(&self, other: &GoImportAlias) -> Ordering
fn cmp(&self, other: &GoImportAlias) -> 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 GoImportAlias
impl PartialEq for GoImportAlias
Source§impl PartialOrd for GoImportAlias
impl PartialOrd for GoImportAlias
Source§impl TryFrom<&str> for GoImportAlias
impl TryFrom<&str> for GoImportAlias
Source§type Error = GoImportError
type Error = GoImportError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &str,
) -> Result<GoImportAlias, <GoImportAlias as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<GoImportAlias, <GoImportAlias as TryFrom<&str>>::Error>
Performs the conversion.
impl Eq for GoImportAlias
impl StructuralPartialEq for GoImportAlias
Auto Trait Implementations§
impl Freeze for GoImportAlias
impl RefUnwindSafe for GoImportAlias
impl Send for GoImportAlias
impl Sync for GoImportAlias
impl Unpin for GoImportAlias
impl UnsafeUnpin for GoImportAlias
impl UnwindSafe for GoImportAlias
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