pub struct GoImportSpec { /* private fields */ }Expand description
Go import specification metadata.
Implementations§
Source§impl GoImportSpec
impl GoImportSpec
Sourcepub const fn new(path: GoImportPath, kind: GoImportKind) -> Self
pub const fn new(path: GoImportPath, kind: GoImportKind) -> Self
Creates import specification metadata.
Sourcepub fn with_alias(self, alias: GoImportAlias) -> Self
pub fn with_alias(self, alias: GoImportAlias) -> Self
Adds an import alias.
Sourcepub const fn path(&self) -> &GoImportPath
pub const fn path(&self) -> &GoImportPath
Returns the import path.
Sourcepub const fn alias(&self) -> Option<&GoImportAlias>
pub const fn alias(&self) -> Option<&GoImportAlias>
Returns the import alias.
Sourcepub const fn kind(&self) -> GoImportKind
pub const fn kind(&self) -> GoImportKind
Returns the import kind.
Trait Implementations§
Source§impl Clone for GoImportSpec
impl Clone for GoImportSpec
Source§fn clone(&self) -> GoImportSpec
fn clone(&self) -> GoImportSpec
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 GoImportSpec
impl Debug for GoImportSpec
Source§impl PartialEq for GoImportSpec
impl PartialEq for GoImportSpec
Source§fn eq(&self, other: &GoImportSpec) -> bool
fn eq(&self, other: &GoImportSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for GoImportSpec
impl StructuralPartialEq for GoImportSpec
Auto Trait Implementations§
impl Freeze for GoImportSpec
impl RefUnwindSafe for GoImportSpec
impl Send for GoImportSpec
impl Sync for GoImportSpec
impl Unpin for GoImportSpec
impl UnsafeUnpin for GoImportSpec
impl UnwindSafe for GoImportSpec
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