pub struct StaticSegment(/* private fields */);Implementations§
Source§impl StaticSegment
impl StaticSegment
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, ApiPrimitiveError>
pub fn new(value: impl AsRef<str>) -> Result<Self, ApiPrimitiveError>
Creates validated text metadata.
§Errors
Returns ApiPrimitiveError when the value is empty or contains control characters.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the value and returns the stored text.
Trait Implementations§
Source§impl AsRef<str> for StaticSegment
impl AsRef<str> for StaticSegment
Source§impl Clone for StaticSegment
impl Clone for StaticSegment
Source§fn clone(&self) -> StaticSegment
fn clone(&self) -> StaticSegment
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 StaticSegment
impl Debug for StaticSegment
Source§impl Display for StaticSegment
impl Display for StaticSegment
Source§impl FromStr for StaticSegment
impl FromStr for StaticSegment
Source§impl Hash for StaticSegment
impl Hash for StaticSegment
Source§impl Ord for StaticSegment
impl Ord for StaticSegment
Source§fn cmp(&self, other: &StaticSegment) -> Ordering
fn cmp(&self, other: &StaticSegment) -> 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 StaticSegment
impl PartialEq for StaticSegment
Source§fn eq(&self, other: &StaticSegment) -> bool
fn eq(&self, other: &StaticSegment) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for StaticSegment
impl PartialOrd for StaticSegment
Source§impl TryFrom<&str> for StaticSegment
impl TryFrom<&str> for StaticSegment
impl Eq for StaticSegment
impl StructuralPartialEq for StaticSegment
Auto Trait Implementations§
impl Freeze for StaticSegment
impl RefUnwindSafe for StaticSegment
impl Send for StaticSegment
impl Sync for StaticSegment
impl Unpin for StaticSegment
impl UnsafeUnpin for StaticSegment
impl UnwindSafe for StaticSegment
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