pub struct StrRef<'a> {
pub(crate) inner: &'a str,
pub(crate) length: Length,
}Expand description
String slice newtype which respects the Length::max limit.
Fields§
§inner: &'a strInner value
length: LengthPrecomputed Length (avoids possible panicking conversions)
Implementations§
Trait Implementations§
Source§impl<'a> DecodeValue<'a> for StrRef<'a>
impl<'a> DecodeValue<'a> for StrRef<'a>
Source§impl<'a> EncodeValue for StrRef<'a>
impl<'a> EncodeValue for StrRef<'a>
Source§impl From<StrRef<'_>> for BytesOwned
impl From<StrRef<'_>> for BytesOwned
Source§fn from(s: StrRef<'_>) -> BytesOwned
fn from(s: StrRef<'_>) -> BytesOwned
Converts to this type from the input type.
Source§impl<'a> Ord for StrRef<'a>
impl<'a> Ord for StrRef<'a>
1.21.0 · 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<'a> PartialOrd for StrRef<'a>
impl<'a> PartialOrd for StrRef<'a>
Source§impl<'a> RefToOwned<'a> for StrRef<'a>
impl<'a> RefToOwned<'a> for StrRef<'a>
impl<'a> Copy for StrRef<'a>
impl<'a> Eq for StrRef<'a>
impl<'a> StructuralPartialEq for StrRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for StrRef<'a>
impl<'a> RefUnwindSafe for StrRef<'a>
impl<'a> Send for StrRef<'a>
impl<'a> Sync for StrRef<'a>
impl<'a> Unpin for StrRef<'a>
impl<'a> UnwindSafe for StrRef<'a>
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