Struct GoExportedIdentifier
pub struct GoExportedIdentifier(/* private fields */);Expand description
Validated exported ASCII-safe Go identifier.
Implementations§
§impl GoExportedIdentifier
impl GoExportedIdentifier
pub fn new(
value: impl Into<String>,
) -> Result<GoExportedIdentifier, GoIdentifierError>
pub fn new( value: impl Into<String>, ) -> Result<GoExportedIdentifier, GoIdentifierError>
Creates an exported Go identifier.
§Errors
Returns GoIdentifierError when value is not a valid ASCII Go identifier or is not exported.
pub fn into_identifier(self) -> GoIdentifier
pub fn into_identifier(self) -> GoIdentifier
Consumes the wrapper and returns the general identifier.
Trait Implementations§
§impl AsRef<str> for GoExportedIdentifier
impl AsRef<str> for GoExportedIdentifier
§impl Clone for GoExportedIdentifier
impl Clone for GoExportedIdentifier
§fn clone(&self) -> GoExportedIdentifier
fn clone(&self) -> GoExportedIdentifier
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for GoExportedIdentifier
impl Debug for GoExportedIdentifier
§impl Display for GoExportedIdentifier
impl Display for GoExportedIdentifier
§impl FromStr for GoExportedIdentifier
impl FromStr for GoExportedIdentifier
§type Err = GoIdentifierError
type Err = GoIdentifierError
The associated error which can be returned from parsing.
§fn from_str(
value: &str,
) -> Result<GoExportedIdentifier, <GoExportedIdentifier as FromStr>::Err>
fn from_str( value: &str, ) -> Result<GoExportedIdentifier, <GoExportedIdentifier as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for GoExportedIdentifier
impl Hash for GoExportedIdentifier
§impl Ord for GoExportedIdentifier
impl Ord for GoExportedIdentifier
§fn cmp(&self, other: &GoExportedIdentifier) -> Ordering
fn cmp(&self, other: &GoExportedIdentifier) -> Ordering
1.21.0 · 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
§impl PartialEq for GoExportedIdentifier
impl PartialEq for GoExportedIdentifier
§impl PartialOrd for GoExportedIdentifier
impl PartialOrd for GoExportedIdentifier
§impl TryFrom<&str> for GoExportedIdentifier
impl TryFrom<&str> for GoExportedIdentifier
§type Error = GoIdentifierError
type Error = GoIdentifierError
The type returned in the event of a conversion error.
§fn try_from(
value: &str,
) -> Result<GoExportedIdentifier, <GoExportedIdentifier as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<GoExportedIdentifier, <GoExportedIdentifier as TryFrom<&str>>::Error>
Performs the conversion.
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