Skip to content
/ ara Public
forked from fasterthanlime/ara

Async random access (Rust traits)

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

JetASAP/ara

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ara

The ara crate provides traits for async random access I/O.

The ReadAt trait provides both an u64 length, and an async read_at method, thanks to async-trait. It is intended to be implemented for anything from in-memory buffers, to local files, to remote resources acessed over protocols like HTTP, FTP, etc.

ReadAtWrapper can be used to turn a type that implements GetReaderAt into a type that implements ReadAt.

BufReaderAt implements buffering on top of a ReadAt type. Whereas linear reads only need a single buffer, a ReadAt can be read at any offset, and thus a BufReaderAt caches "pages", with LRU (least-recently used) eviction.

Note that ara does not implement any of the traits for files, or HTTP resources. It exists purely to define an interface between resources, and consumers of those resources (like format readers, zip extractors, etc.).

License

This project is licensed under either of

at your option.

About

Async random access (Rust traits)

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%