pub struct NewtypeRef<Marker, T>where
T: Deref,{ /* private fields */ }
Expand description
A slice for a NewtypeBuf
Implementations§
Trait Implementations§
Source§impl<Marker, T, R> AsRef<R> for NewtypeRef<Marker, T>
impl<Marker, T, R> AsRef<R> for NewtypeRef<Marker, T>
Source§impl<Marker, T> Borrow<NewtypeRef<Marker, T>> for NewtypeBuf<Marker, T>where
T: Deref,
impl<Marker, T> Borrow<NewtypeRef<Marker, T>> for NewtypeBuf<Marker, T>where
T: Deref,
Source§fn borrow(&self) -> &NewtypeRef<Marker, T>
fn borrow(&self) -> &NewtypeRef<Marker, T>
Immutably borrows from an owned value. Read more
Source§impl<Marker, T> Debug for NewtypeRef<Marker, T>
impl<Marker, T> Debug for NewtypeRef<Marker, T>
Source§impl<Marker, T> Display for NewtypeRef<Marker, T>
impl<Marker, T> Display for NewtypeRef<Marker, T>
Source§impl<'a, Marker, T> From<&'a NewtypeRef<Marker, T>> for &'a str
impl<'a, Marker, T> From<&'a NewtypeRef<Marker, T>> for &'a str
Source§fn from(s: &'a NewtypeRef<Marker, T>) -> Self
fn from(s: &'a NewtypeRef<Marker, T>) -> Self
Converts to this type from the input type.
Source§impl<'a, Marker, T> From<&'a str> for &'a NewtypeRef<Marker, T>
impl<'a, Marker, T> From<&'a str> for &'a NewtypeRef<Marker, T>
Source§impl<Marker, T> Hash for NewtypeRef<Marker, T>
impl<Marker, T> Hash for NewtypeRef<Marker, T>
Source§impl<Marker, T> PartialEq for NewtypeRef<Marker, T>
impl<Marker, T> PartialEq for NewtypeRef<Marker, T>
Source§impl<Marker, T, R> ToOwned for NewtypeRef<Marker, T>
impl<Marker, T, R> ToOwned for NewtypeRef<Marker, T>
Source§type Owned = NewtypeBuf<Marker, T>
type Owned = NewtypeBuf<Marker, T>
The resulting type after obtaining ownership.
Source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
Source§impl<Marker, T> TransparentWrapper<<T as Deref>::Target> for NewtypeRef<Marker, T>where
T: Deref,
impl<Marker, T> TransparentWrapper<<T as Deref>::Target> for NewtypeRef<Marker, T>where
T: Deref,
Source§fn wrap_ref(s: &Inner) -> &Self
fn wrap_ref(s: &Inner) -> &Self
Convert a reference to the inner type into a reference to the wrapper
type.
Source§fn wrap_mut(s: &mut Inner) -> &mut Self
fn wrap_mut(s: &mut Inner) -> &mut Self
Convert a mutable reference to the inner type into a mutable reference to
the wrapper type.
Source§fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
Convert a slice to the inner type into a slice to the wrapper type.
Source§fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
Convert a mutable slice to the inner type into a mutable slice to the
wrapper type.
Source§fn peel_ref(s: &Self) -> &Inner
fn peel_ref(s: &Self) -> &Inner
Convert a reference to the wrapper type into a reference to the inner
type.
Source§fn peel_mut(s: &mut Self) -> &mut Inner
fn peel_mut(s: &mut Self) -> &mut Inner
Convert a mutable reference to the wrapper type into a mutable reference
to the inner type.
Source§fn peel_slice(s: &[Self]) -> &[Inner]where
Self: Sized,
fn peel_slice(s: &[Self]) -> &[Inner]where
Self: Sized,
Convert a slice to the wrapped type into a slice to the inner type.
Source§fn peel_slice_mut(s: &mut [Self]) -> &mut [Inner]where
Self: Sized,
fn peel_slice_mut(s: &mut [Self]) -> &mut [Inner]where
Self: Sized,
Convert a mutable slice to the wrapped type into a mutable slice to the
inner type.
impl<Marker, T> Eq for NewtypeRef<Marker, T>
Auto Trait Implementations§
impl<Marker, T> Freeze for NewtypeRef<Marker, T>
impl<Marker, T> RefUnwindSafe for NewtypeRef<Marker, T>
impl<Marker, T> Send for NewtypeRef<Marker, T>
impl<Marker, T> Sync for NewtypeRef<Marker, T>
impl<Marker, T> Unpin for NewtypeRef<Marker, T>
impl<Marker, T> UnwindSafe for NewtypeRef<Marker, T>
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