pub struct OutputView<'view, Input, Output> {
pub output: Output,
pub input_ref: Option<&'view Input>,
pub metadata: ViewMetadata,
}Expand description
Zero-copy output view with lifetime management
This struct demonstrates how to create zero-copy views of processed data while maintaining safe lifetime relationships between input and output.
Fields§
§output: OutputProcessed output data
input_ref: Option<&'view Input>Optional reference to original input (zero-copy)
metadata: ViewMetadataProcessing metadata
Trait Implementations§
Auto Trait Implementations§
impl<'view, Input, Output> Freeze for OutputView<'view, Input, Output>where
Output: Freeze,
impl<'view, Input, Output> RefUnwindSafe for OutputView<'view, Input, Output>where
Output: RefUnwindSafe,
Input: RefUnwindSafe,
impl<'view, Input, Output> Send for OutputView<'view, Input, Output>
impl<'view, Input, Output> Sync for OutputView<'view, Input, Output>
impl<'view, Input, Output> Unpin for OutputView<'view, Input, Output>where
Output: Unpin,
impl<'view, Input, Output> UnwindSafe for OutputView<'view, Input, Output>where
Output: UnwindSafe,
Input: RefUnwindSafe,
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