Struct outmove_common::types::identifier::IdentStr [−][src]
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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for IdentStr
[src]
fn cmp(&self, other: &IdentStr) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<IdentStr> for IdentStr
[src]
impl PartialOrd<IdentStr> for IdentStr
[src]
fn partial_cmp(&self, other: &IdentStr) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl RefCast for IdentStr
[src]
type From = str
fn ref_cast(_from: &Self::From) -> &Self
[src]
fn ref_cast_mut(_from: &mut Self::From) -> &mut Self
[src]
impl StructuralEq for IdentStr
[src]
impl StructuralPartialEq for IdentStr
[src]
impl ToOwned for IdentStr
[src]
type Owned = Identifier
The resulting type after obtaining ownership.