Struct GoUnexportedIdentifier
pub struct GoUnexportedIdentifier(/* private fields */);Expand description
Validated unexported ASCII-safe Go identifier.
Implementations§
§impl GoUnexportedIdentifier
impl GoUnexportedIdentifier
pub fn new(
value: impl Into<String>,
) -> Result<GoUnexportedIdentifier, GoIdentifierError>
pub fn new( value: impl Into<String>, ) -> Result<GoUnexportedIdentifier, GoIdentifierError>
Creates an unexported Go identifier.
§Errors
Returns GoIdentifierError when value is not a valid ASCII Go identifier or is not unexported.
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 GoUnexportedIdentifier
impl AsRef<str> for GoUnexportedIdentifier
§impl Clone for GoUnexportedIdentifier
impl Clone for GoUnexportedIdentifier
§fn clone(&self) -> GoUnexportedIdentifier
fn clone(&self) -> GoUnexportedIdentifier
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 GoUnexportedIdentifier
impl Debug for GoUnexportedIdentifier
§impl Display for GoUnexportedIdentifier
impl Display for GoUnexportedIdentifier
§impl FromStr for GoUnexportedIdentifier
impl FromStr for GoUnexportedIdentifier
§type Err = GoIdentifierError
type Err = GoIdentifierError
The associated error which can be returned from parsing.
§fn from_str(
value: &str,
) -> Result<GoUnexportedIdentifier, <GoUnexportedIdentifier as FromStr>::Err>
fn from_str( value: &str, ) -> Result<GoUnexportedIdentifier, <GoUnexportedIdentifier as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for GoUnexportedIdentifier
impl Hash for GoUnexportedIdentifier
§impl Ord for GoUnexportedIdentifier
impl Ord for GoUnexportedIdentifier
§fn cmp(&self, other: &GoUnexportedIdentifier) -> Ordering
fn cmp(&self, other: &GoUnexportedIdentifier) -> 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 GoUnexportedIdentifier
impl PartialEq for GoUnexportedIdentifier
§impl PartialOrd for GoUnexportedIdentifier
impl PartialOrd for GoUnexportedIdentifier
§impl TryFrom<&str> for GoUnexportedIdentifier
impl TryFrom<&str> for GoUnexportedIdentifier
§type Error = GoIdentifierError
type Error = GoIdentifierError
The type returned in the event of a conversion error.
§fn try_from(
value: &str,
) -> Result<GoUnexportedIdentifier, <GoUnexportedIdentifier as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<GoUnexportedIdentifier, <GoUnexportedIdentifier as TryFrom<&str>>::Error>
Performs the conversion.
impl Eq for GoUnexportedIdentifier
impl StructuralPartialEq for GoUnexportedIdentifier
Auto Trait Implementations§
impl Freeze for GoUnexportedIdentifier
impl RefUnwindSafe for GoUnexportedIdentifier
impl Send for GoUnexportedIdentifier
impl Sync for GoUnexportedIdentifier
impl Unpin for GoUnexportedIdentifier
impl UnsafeUnpin for GoUnexportedIdentifier
impl UnwindSafe for GoUnexportedIdentifier
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