pub struct Same;Expand description
A Convert for a source and result of one type, which keeps each item as it is. A walk or scatter with it moves items straight between its source and result, with no conversion pass.
Trait Implementations§
Source§impl<T> Convert<T, T> for Samewhere
T: Copy,
impl<T> Convert<T, T> for Samewhere
T: Copy,
Source§fn same<'a>(&self, d: &'a mut Vec<T>) -> Option<&'a mut Vec<T>>
fn same<'a>(&self, d: &'a mut Vec<T>) -> Option<&'a mut Vec<T>>
d as a buffer of source items, where the conversion keeps each item as it is.Source§fn borrowed<'a>(&self, s: &'a [T]) -> Option<&'a [T]>
fn borrowed<'a>(&self, s: &'a [T]) -> Option<&'a [T]>
s as result items, where the conversion keeps each item as it is.Auto Trait Implementations§
impl Forget for Same
impl Freeze for Same
impl RefUnwindSafe for Same
impl Send for Same
impl Sync for Same
impl Unpin for Same
impl UnsafeUnpin for Same
impl UnwindSafe for Same
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more