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<Self, GoImportError>
pub fn new(value: impl AsRef<str>) -> Result<Self, 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 (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 GoImportAlias
impl Debug for GoImportAlias
Source§impl Display for GoImportAlias
impl Display for GoImportAlias
Source§impl FromStr for GoImportAlias
impl FromStr for GoImportAlias
Source§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 (const: unstable) · 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§fn eq(&self, other: &GoImportAlias) -> bool
fn eq(&self, other: &GoImportAlias) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for GoImportAlias
impl PartialOrd for GoImportAlias
Source§impl TryFrom<&str> for GoImportAlias
impl TryFrom<&str> for GoImportAlias
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