pub struct GoExportedIdentifier(/* private fields */);Expand description
Validated exported ASCII-safe Go identifier.
Implementations§
Source§impl GoExportedIdentifier
impl GoExportedIdentifier
Sourcepub fn new(value: impl Into<String>) -> Result<Self, GoIdentifierError>
pub fn new(value: impl Into<String>) -> Result<Self, GoIdentifierError>
Creates an exported Go identifier.
§Errors
Returns GoIdentifierError when value is not a valid ASCII Go identifier or is not exported.
Sourcepub fn into_identifier(self) -> GoIdentifier
pub fn into_identifier(self) -> GoIdentifier
Consumes the wrapper and returns the general identifier.
Trait Implementations§
Source§impl AsRef<str> for GoExportedIdentifier
impl AsRef<str> for GoExportedIdentifier
Source§impl Clone for GoExportedIdentifier
impl Clone for GoExportedIdentifier
Source§fn clone(&self) -> GoExportedIdentifier
fn clone(&self) -> GoExportedIdentifier
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 GoExportedIdentifier
impl Debug for GoExportedIdentifier
Source§impl Display for GoExportedIdentifier
impl Display for GoExportedIdentifier
Source§impl FromStr for GoExportedIdentifier
impl FromStr for GoExportedIdentifier
Source§impl Hash for GoExportedIdentifier
impl Hash for GoExportedIdentifier
Source§impl Ord for GoExportedIdentifier
impl Ord for GoExportedIdentifier
Source§fn cmp(&self, other: &GoExportedIdentifier) -> Ordering
fn cmp(&self, other: &GoExportedIdentifier) -> 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 GoExportedIdentifier
impl PartialEq for GoExportedIdentifier
Source§fn eq(&self, other: &GoExportedIdentifier) -> bool
fn eq(&self, other: &GoExportedIdentifier) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for GoExportedIdentifier
impl PartialOrd for GoExportedIdentifier
Source§impl TryFrom<&str> for GoExportedIdentifier
impl TryFrom<&str> for GoExportedIdentifier
impl Eq for GoExportedIdentifier
impl StructuralPartialEq for GoExportedIdentifier
Auto Trait Implementations§
impl Freeze for GoExportedIdentifier
impl RefUnwindSafe for GoExportedIdentifier
impl Send for GoExportedIdentifier
impl Sync for GoExportedIdentifier
impl Unpin for GoExportedIdentifier
impl UnsafeUnpin for GoExportedIdentifier
impl UnwindSafe for GoExportedIdentifier
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