pub struct ExportKind(/* private fields */);Expand description
An open, symbol-keyed export kind tag.
Export kinds are carried as data rather than a closed kernel enum so that libraries can introduce new kinds without a kernel change; the well-known kinds are named by the associated constants.
Implementations§
Source§impl ExportKind
impl ExportKind
Sourcepub const NUMBER_DOMAIN: &'static str = "number-domain"
pub const NUMBER_DOMAIN: &'static str = "number-domain"
Well-known kind name for number-domain exports.
Sourcepub fn named(name: &'static str) -> Self
pub fn named(name: &'static str) -> Self
Builds an export kind from a well-known static kind name.
Sourcepub fn name(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
Returns the unqualified kind name, or None if the symbol is namespaced.
Sourcepub fn duplicate_error_kind(&self) -> &'static str
pub fn duplicate_error_kind(&self) -> &'static str
Maps a well-known kind to its static label for duplicate-export errors,
falling back to "export" for unrecognized kinds.
Trait Implementations§
Source§impl Clone for ExportKind
impl Clone for ExportKind
Source§fn clone(&self) -> ExportKind
fn clone(&self) -> ExportKind
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 ExportKind
impl Debug for ExportKind
impl Eq for ExportKind
Source§impl Hash for ExportKind
impl Hash for ExportKind
Source§impl Ord for ExportKind
impl Ord for ExportKind
Source§fn cmp(&self, other: &ExportKind) -> Ordering
fn cmp(&self, other: &ExportKind) -> 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 ExportKind
impl PartialEq for ExportKind
Source§fn eq(&self, other: &ExportKind) -> bool
fn eq(&self, other: &ExportKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ExportKind
impl PartialOrd for ExportKind
impl StructuralPartialEq for ExportKind
Auto Trait Implementations§
impl Freeze for ExportKind
impl RefUnwindSafe for ExportKind
impl Send for ExportKind
impl Sync for ExportKind
impl Unpin for ExportKind
impl UnsafeUnpin for ExportKind
impl UnwindSafe for ExportKind
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