-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement read trait for assets for full reader functionality #24
base: main
Are you sure you want to change the base?
Conversation
src/bccontext_fabric_io.rs
Outdated
|
||
use std::io::{ErrorKind, Read, SeekFrom}; | ||
|
||
pub struct FabricSteamReader<'a> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope this is just a typo...
pub struct FabricSteamReader<'a> { | |
pub struct FabricStreamReader<'a> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some notes on this. It seems reasonable on the whole. I didn't have a ton of time to dedicate to the review, however..
} | ||
|
||
impl std::io::Seek for FabricStreamWriter<'_> { | ||
fn seek(&mut self, pos: SeekFrom) -> Result<u64, std::io::Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should just error, right?
/// byte slice of the read stream | ||
/// [Example](https://github.com/eluv-io/elv-wasm/blob/019b88ac27635d5022c2211751f6af5957df2463/samples/objtar/src/lib.rs#L112) | ||
/// | ||
pub fn read_stream_chunked(&'a self, stream_to_read: String, chunk_size: usize) -> CallResult { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document on read_stream
that setting a size of 0 results in the entire stream being read into memory at once.
No description provided.