pub struct StreamingLoader { /* private fields */ }Expand description
Streaming loader for continuous fragment loading
Implementations§
Source§impl StreamingLoader
impl StreamingLoader
Sourcepub fn new(
loader: Arc<NetworkLoader>,
path_prefix: impl Into<String>,
buffer: usize,
) -> Self
pub fn new( loader: Arc<NetworkLoader>, path_prefix: impl Into<String>, buffer: usize, ) -> Self
Create a new streaming loader
Sourcepub async fn start(&mut self, requests: Vec<LoadRequest>)
pub async fn start(&mut self, requests: Vec<LoadRequest>)
Start loading fragments
Sourcepub async fn next(&mut self) -> Option<LoadResult>
pub async fn next(&mut self) -> Option<LoadResult>
Receive next result
Sourcepub async fn next_timeout(&mut self, timeout: Duration) -> Option<LoadResult>
pub async fn next_timeout(&mut self, timeout: Duration) -> Option<LoadResult>
Receive with timeout
Auto Trait Implementations§
impl Freeze for StreamingLoader
impl !RefUnwindSafe for StreamingLoader
impl Send for StreamingLoader
impl Sync for StreamingLoader
impl Unpin for StreamingLoader
impl !UnwindSafe for StreamingLoader
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