Skip to content
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::read_exact #40

Open
ethe opened this issue Oct 3, 2024 · 8 comments
Open

Implement Read::read_exact #40

ethe opened this issue Oct 3, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ethe
Copy link
Member

ethe commented Oct 3, 2024

In the current, Read trait does not have read_exact method, it should be supported like https://docs.rs/monoio/latest/monoio/io/trait.AsyncReadRentExt.html#tymethod.read_exact

@ethe ethe changed the title Implement fusio::Read::read_exact Implement Read::read_exact Oct 3, 2024
@ethe ethe added enhancement New feature or request good first issue Good for newcomers labels Oct 3, 2024
@PhVHoang
Copy link

PhVHoang commented Oct 8, 2024

Hi @ethe , for S3File struct, will the behavior of read_exact be the same as read?

@ethe
Copy link
Member Author

ethe commented Oct 8, 2024

Yes, I think so, S3File always read exactly.

@PhVHoang
Copy link

PhVHoang commented Oct 8, 2024

Thanks @ethe . Is fusio open for contributions at this moment? If yes I would love to take this issue.

@ethe
Copy link
Member Author

ethe commented Oct 8, 2024

Sure, I would love to.

@ethe
Copy link
Member Author

ethe commented Oct 9, 2024

I open a PR for the basic default implementation of read_exact: #51, but this PR is still valid and needs to be continue:

  • specific Read implementations, for example there are more efficient way to read exactly on S3
  • ReadDyn support

@PhVHoang
Copy link

I open a PR for the basic default implementation of read_exact: #51, but this PR is still valid and needs to be continue:

  • specific Read implementations, for example there are more efficient way to read exactly on S3
  • ReadDyn support

RE: specific Read implementations
Does it mean the implementations for all backend storages (S3File, TokioFile, MonoioFile)? If it's the case I'm working on it now.

RE: ReadDyn support
Could you please elaborate more on this part?

@ethe
Copy link
Member Author

ethe commented Oct 10, 2024

Does it mean the implementations for all backend storages (S3File, TokioFile, MonoioFile)? If it's the case I'm working on it now.

Yes, I think so

Could you please elaborate more on this part?

in #51 , I just implemented read_exact for Read, fusio has another set of object safe traits which includes DynRead, we should also define and implement read_exact for it.

@PhVHoang
Copy link

Does it mean the implementations for all backend storages (S3File, TokioFile, MonoioFile)? If it's the case I'm working on it now.

Yes, I think so

Could you please elaborate more on this part?

in #51 , I just implemented read_exact for Read, fusio has another set of object safe traits which includes DynRead, we should also implement define and implement read_exact for it.

Ah okay, got it. So it's DynRead not ReadDyn 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants