pub struct Lazy<V, F> { /* private fields */ }Expand description
A lazy-initialized view.
The view is only initialized when polled for a grant.
Implementations§
Trait Implementations§
Source§impl<V, F> View for Lazy<V, F>
impl<V, F> View for Lazy<V, F>
Source§fn poll_grant(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
count: usize,
) -> Poll<Result<(), Self::Error>>
fn poll_grant( self: Pin<&mut Self>, cx: &mut Context<'_>, count: usize, ) -> Poll<Result<(), Self::Error>>
Attempt to obtain a view of at least
count elements. Read moreSource§fn release(&mut self, count: usize)
fn release(&mut self, count: usize)
Attempt to advance past the first
count elements in the current view. Read moreSource§fn grant(&mut self, count: usize) -> Grant<'_, Self> ⓘ
fn grant(&mut self, count: usize) -> Grant<'_, Self> ⓘ
Create a future that obtains a view of at least
count elements. Read moreimpl<V: Copy, F: Copy> Copy for Lazy<V, F>
impl<'pin, V, F> Unpin for Lazy<V, F>where
PinnedFieldsOf<__Lazy<'pin, V, F>>: Unpin,
Auto Trait Implementations§
impl<V, F> Freeze for Lazy<V, F>
impl<V, F> RefUnwindSafe for Lazy<V, F>where
V: RefUnwindSafe,
F: RefUnwindSafe,
impl<V, F> Send for Lazy<V, F>
impl<V, F> Sync for Lazy<V, F>
impl<V, F> UnsafeUnpin for Lazy<V, F>where
V: UnsafeUnpin,
F: UnsafeUnpin,
impl<V, F> UnwindSafe for Lazy<V, F>where
V: UnwindSafe,
F: UnwindSafe,
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