pub struct SupportName(/* private fields */);Expand description
The exported name a consumption target invokes one declaration’s carrier by.
The author chooses it and the consumer’s own compiler collision-checks it: the physical carrier is exported under a spelling nobody can know before expansion, so a declaration whose carrier nobody can address is a declaration whose rows nobody can run.
Implementations§
Source§impl SupportName
impl SupportName
Sourcepub fn declared(spelling: &str) -> Result<Self, DeclarationError>
pub fn declared(spelling: &str) -> Result<Self, DeclarationError>
This exported support name, from the spelling an author wrote.
§Errors
Returns DeclarationError::NotAnIdentifier where the spelling cannot name a rendered item — not one Rust identifier, or a keyword the language already took: it is written into a consumer’s target in identifier position, and either disagreement renders tokens that compiler reads as something else.
Trait Implementations§
Source§impl Clone for SupportName
impl Clone for SupportName
Source§fn clone(&self) -> SupportName
fn clone(&self) -> SupportName
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 SupportName
impl Debug for SupportName
impl Eq for SupportName
Source§impl Hash for SupportName
impl Hash for SupportName
Source§impl Ord for SupportName
impl Ord for SupportName
Source§fn cmp(&self, other: &SupportName) -> Ordering
fn cmp(&self, other: &SupportName) -> 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for SupportName
impl PartialEq for SupportName
Source§impl PartialOrd for SupportName
impl PartialOrd for SupportName
impl StructuralPartialEq for SupportName
Auto Trait Implementations§
impl Freeze for SupportName
impl RefUnwindSafe for SupportName
impl Send for SupportName
impl Sync for SupportName
impl Unpin for SupportName
impl UnsafeUnpin for SupportName
impl UnwindSafe for SupportName
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