pub struct Output<'a, T: ?Sized, U> { /* private fields */ }
Expand description
Allocated output.
Implementations
sourceimpl<'a, T: ?Sized, U> Output<'a, T, U>
impl<'a, T: ?Sized, U> Output<'a, T, U>
sourcepub unsafe fn new_unchecked(data_ref: OutRef<'a, T>, val: U) -> Self
pub unsafe fn new_unchecked(data_ref: OutRef<'a, T>, val: U) -> Self
sourceimpl<'a, T, U: AsMut<[T]>> Output<'a, [T], U>
impl<'a, T, U: AsMut<[T]>> Output<'a, [T], U>
sourcepub fn stage_slice(alloc: &mut impl Allocator, val: U) -> Result<Self>
pub fn stage_slice(alloc: &mut impl Allocator, val: U) -> Result<Self>
Attempts to allocate input segment to fit val.len()
elements of val
in the block
and returns the resulting Output
on success.
sourceimpl<'a, T: ?Sized + Copy, U: AsMut<[T]>> Output<'a, [T], U>
impl<'a, T: ?Sized + Copy, U: AsMut<[T]>> Output<'a, [T], U>
sourcepub unsafe fn collect_range(self, col: &impl Collector, range: Range<usize>) -> U
pub unsafe fn collect_range(self, col: &impl Collector, range: Range<usize>) -> U
Copies data from the block to range
within the contained value and returns it.
Safety
Calling this method with a range
, for which range.len() > self.len()
is undefined behavior.
Trait Implementations
Auto Trait Implementations
impl<'a, T: ?Sized, U> RefUnwindSafe for Output<'a, T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<'a, T, U> !Send for Output<'a, T, U>
impl<'a, T, U> !Sync for Output<'a, T, U>
impl<'a, T: ?Sized, U> Unpin for Output<'a, T, U> where
U: Unpin,
impl<'a, T: ?Sized, U> UnwindSafe for Output<'a, T, U> where
T: RefUnwindSafe,
U: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more