Struct UriTemplateString
struct UriTemplateString { ... }
An owned slice of a URI template.
URI Template is defined by RFC 6570.
Note that "URI Template" can also be used for IRI.
Valid values
This type can have a URI template string.
Implementations
impl UriTemplateString
unsafe fn new_unchecked(s: String) -> SelfCreates a new string without validation.
This does not validate the given string, so it is caller's responsibility to ensure the given string is valid.
Safety
The given string must be syntactically valid as
Selftype. If not, any use of the returned value or the call of this function itself may result in undefined behavior.fn shrink_to_fit(self: &mut Self)Shrinks the capacity of the inner buffer to match its length.
fn capacity(self: &Self) -> usizeReturns the internal buffer capacity in bytes.
fn as_slice(self: &Self) -> &UriTemplateStrReturns the borrowed IRI string slice.
This is equivalent to
&*self.fn append(self: &mut Self, other: &UriTemplateStr)Appends the template string.
impl AsRef for UriTemplateString
fn as_ref(self: &Self) -> &str
impl AsRef for UriTemplateString
fn as_ref(self: &Self) -> &UriTemplateStr
impl Borrow for UriTemplateString
fn borrow(self: &Self) -> &str
impl Borrow for UriTemplateString
fn borrow(self: &Self) -> &UriTemplateStr
impl Clone for UriTemplateString
fn clone(self: &Self) -> UriTemplateString
impl Debug for UriTemplateString
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Default for UriTemplateString
fn default() -> UriTemplateString
impl Deref for UriTemplateString
fn deref(self: &Self) -> &UriTemplateStr
impl Display for UriTemplateString
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for UriTemplateString
impl Freeze for UriTemplateString
impl From for UriTemplateString
fn from(s: &UriTemplateStr) -> Self
impl FromStr for UriTemplateString
fn from_str(s: &str) -> Result<Self, <Self as >::Err>
impl Hash for UriTemplateString
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl Ord for UriTemplateString
fn cmp(self: &Self, other: &UriTemplateString) -> Ordering
impl PartialEq for UriTemplateString
fn eq(self: &Self, o: &&str) -> bool
impl PartialEq for UriTemplateString
fn eq(self: &Self, o: &str) -> bool
impl PartialEq for UriTemplateString
fn eq(self: &Self, other: &UriTemplateString) -> bool
impl PartialEq for UriTemplateString
fn eq(self: &Self, o: &String) -> bool
impl PartialEq for UriTemplateString
fn eq(self: &Self, o: &Cow<'_, str>) -> bool
impl PartialOrd for UriTemplateString
fn partial_cmp(self: &Self, other: &UriTemplateString) -> Option<Ordering>
impl PartialOrd for UriTemplateString
fn partial_cmp(self: &Self, o: &String) -> Option<Ordering>
impl PartialOrd for UriTemplateString
fn partial_cmp(self: &Self, o: &Cow<'_, str>) -> Option<Ordering>
impl PartialOrd for UriTemplateString
fn partial_cmp(self: &Self, o: &&str) -> Option<Ordering>
impl PartialOrd for UriTemplateString
fn partial_cmp(self: &Self, o: &str) -> Option<Ordering>
impl RefUnwindSafe for UriTemplateString
impl Send for UriTemplateString
impl StructuralPartialEq for UriTemplateString
impl Sync for UriTemplateString
impl TryFrom for UriTemplateString
fn try_from(s: &str) -> Result<Self, <Self as >::Error>
impl TryFrom for UriTemplateString
fn try_from(bytes: &[u8]) -> Result<Self, <Self as >::Error>
impl TryFrom for UriTemplateString
fn try_from(s: String) -> Result<Self, <Self as >::Error>
impl Unpin for UriTemplateString
impl UnsafeUnpin for UriTemplateString
impl UnwindSafe for UriTemplateString
impl<P, T> Receiver for UriTemplateString
impl<T> Any for UriTemplateString
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for UriTemplateString
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for UriTemplateString
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for UriTemplateString
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for UriTemplateString
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for UriTemplateString
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> ToString for UriTemplateString
fn to_string(self: &Self) -> String
impl<T> ToStringFallible for UriTemplateString
fn try_to_string(self: &Self) -> Result<String, TryReserveError>[
ToString::to_string]alloc::string::ToString::to_string, but without panic on OOM.
impl<T, U> Into for UriTemplateString
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for UriTemplateString
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for UriTemplateString
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>