pub struct MapWriter<F, T1, T2, W>{
pub(crate) _phantom: PhantomData<(T1, T2)>,
pub(crate) transform: F,
pub(crate) writer: W,
}
Expand description
Writer that applies a transform to an underlying writer.
Fields§
§_phantom: PhantomData<(T1, T2)>
§transform: F
§writer: W
Trait Implementations§
Source§impl<F, T1, T2, W> ObjectWriter<T1> for MapWriter<F, T1, T2, W>
impl<F, T1, T2, W> ObjectWriter<T1> for MapWriter<F, T1, T2, W>
Source§fn write_object(&mut self, object: T1) -> Result<()>
fn write_object(&mut self, object: T1) -> Result<()>
Write one object.
Source§fn write_all_objects<I>(&mut self, objects: I) -> Result<usize>where
I: Iterator<Item = T>,
fn write_all_objects<I>(&mut self, objects: I) -> Result<usize>where
I: Iterator<Item = T>,
Write an iterator full of objects.
Auto Trait Implementations§
impl<F, T1, T2, W> Freeze for MapWriter<F, T1, T2, W>
impl<F, T1, T2, W> RefUnwindSafe for MapWriter<F, T1, T2, W>
impl<F, T1, T2, W> Send for MapWriter<F, T1, T2, W>
impl<F, T1, T2, W> Sync for MapWriter<F, T1, T2, W>
impl<F, T1, T2, W> Unpin for MapWriter<F, T1, T2, W>
impl<F, T1, T2, W> UnwindSafe for MapWriter<F, T1, T2, W>
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
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