pub struct RequestSource(/* private fields */);Implementations§
Source§impl RequestSource
impl RequestSource
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 RequestSource
impl AsRef<str> for RequestSource
Source§impl Clone for RequestSource
impl Clone for RequestSource
Source§fn clone(&self) -> RequestSource
fn clone(&self) -> RequestSource
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 RequestSource
impl Debug for RequestSource
Source§impl Display for RequestSource
impl Display for RequestSource
Source§impl FromStr for RequestSource
impl FromStr for RequestSource
Source§impl Hash for RequestSource
impl Hash for RequestSource
Source§impl Ord for RequestSource
impl Ord for RequestSource
Source§fn cmp(&self, other: &RequestSource) -> Ordering
fn cmp(&self, other: &RequestSource) -> 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 RequestSource
impl PartialEq for RequestSource
Source§fn eq(&self, other: &RequestSource) -> bool
fn eq(&self, other: &RequestSource) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for RequestSource
impl PartialOrd for RequestSource
Source§impl TryFrom<&str> for RequestSource
impl TryFrom<&str> for RequestSource
impl Eq for RequestSource
impl StructuralPartialEq for RequestSource
Auto Trait Implementations§
impl Freeze for RequestSource
impl RefUnwindSafe for RequestSource
impl Send for RequestSource
impl Sync for RequestSource
impl Unpin for RequestSource
impl UnsafeUnpin for RequestSource
impl UnwindSafe for RequestSource
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