[−][src]Trait as_is::AsIs
Used to do a cheap conversion into Is<'a, T>
in a generic context.
Associated Types
Loading content...Required methods
fn as_is<'a>(self) -> Is<'a, Self::Is> where
Self: 'a,
Self: 'a,
Converts self
into an Is<'a, Self::Is>
.
Provided methods
fn into_is_cow<'a>(self) -> IsCow<'a, Self::Is> where
Self: 'a,
Self: 'a,
Converts self
into an IsCow<'a, Self::Is>
.
fn into_is_mut<'a>(self) -> IsMut<'a, Self::Is> where
Self: 'a,
Owned<Self>: BorrowMut<Self::Is>,
Self: 'a,
Owned<Self>: BorrowMut<Self::Is>,
Converts self
into an IsMut<'a, Self::Is>
.
If self
is neither an owned nor a mutably borrowed data,
it creates an owned data by cloning.
fn into_owned(self) -> Owned<Self>
Converts self
into an owned data.
If self
is not an owned data, it creates an owned data by cloning.
fn into_cow<'a>(self) -> Cow<'a, Self::Is> where
Self: 'a,
Self: 'a,
Converts self
into a Cow<'a, Self::Is>
.
Implementations on Foreign Types
impl AsIs for i8
[src]
impl AsIs for i16
[src]
impl AsIs for i32
[src]
impl AsIs for i64
[src]
impl AsIs for i128
[src]
impl AsIs for isize
[src]
impl AsIs for u8
[src]
impl AsIs for u16
[src]
impl AsIs for u32
[src]
impl AsIs for u64
[src]
impl AsIs for u128
[src]
impl AsIs for usize
[src]
impl AsIs for f32
[src]
impl AsIs for f64
[src]
impl AsIs for bool
[src]
impl AsIs for String
[src]
impl<T> AsIs for Vec<T> where
T: Clone,
[src]
T: Clone,
impl<B: ?Sized, '_> AsIs for Cow<'_, B> where
B: ToOwned,
[src]
B: ToOwned,
impl<T: ?Sized, '_> AsIs for &'_ T where
T: ToOwned,
T::Owned: IsOwned,
[src]
T: ToOwned,
T::Owned: IsOwned,
impl<T: ?Sized, '_> AsIs for &'_ mut T where
T: ToOwned,
T::Owned: IsOwned,
[src]
Loading content...T: ToOwned,
T::Owned: IsOwned,
Implementors
impl<T: ?Sized, '_> AsIs for Is<'_, T> where
T: ToOwned,
[src]
T: ToOwned,
impl<T: ?Sized, '_> AsIs for IsCow<'_, T> where
T: ToOwned,
[src]
T: ToOwned,
impl<T: ?Sized, '_> AsIs for IsMut<'_, T> where
T: ToOwned,
T::Owned: BorrowMut<T>,
[src]
T: ToOwned,
T::Owned: BorrowMut<T>,