Struct outmove_common::types::identifier::IdentStr[][src]

#[repr(transparent)]pub struct IdentStr(_);

A borrowed identifier.

For more details, see the module level documentation.

Implementations

impl IdentStr[src]

pub fn new(s: &str) -> Result<&IdentStr>[src]

pub fn is_valid(s: impl AsRef<str>) -> bool[src]

Returns true if this string is a valid identifier.

pub fn len(&self) -> usize[src]

Returns the length of self in bytes.

pub fn is_empty(&self) -> bool[src]

Returns true if self has a length of zero bytes.

pub fn as_str(&self) -> &str[src]

Converts self to a &str.

This is not implemented as a From trait to discourage automatic conversions -- these conversions should not typically happen.

pub fn as_bytes(&self) -> &[u8][src]

Converts self to a byte slice.

Trait Implementations

impl AsRef<IdentStr> for Identifier[src]

impl Borrow<IdentStr> for Identifier[src]

impl Debug for IdentStr[src]

impl Display for IdentStr[src]

impl Eq for IdentStr[src]

impl<'a> From<&'a IdentStr> for Identifier[src]

impl Hash for IdentStr[src]

impl Ord for IdentStr[src]

impl PartialEq<IdentStr> for IdentStr[src]

impl PartialOrd<IdentStr> for IdentStr[src]

impl RefCast for IdentStr[src]

type From = str

impl StructuralEq for IdentStr[src]

impl StructuralPartialEq for IdentStr[src]

impl ToOwned for IdentStr[src]

type Owned = Identifier

The resulting type after obtaining ownership.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]