Gofer.rs makes it easy to fetch data from any URL in Rust.
Just call gofer::open(url) to get back a Read!
Currently supports https:, http:, ftp:, file:, and data: URLs.
Supports opting out of any feature using comprehensive feature flags .
Adheres to the Rust API Guidelines in its naming conventions .
100% free and unencumbered public domain software.
Installation in Cargo.toml (with all features enabled)
[dependencies ]
gofer = " 0.1"
Installation in Cargo.toml (with only specific features enabled)
[dependencies ]
gofer = { version = " 0.1" , default-features = false , features = [" file" ] }
let result = gofer:: open ( "https://www.google.com/robots.txt" ) ;
let result = gofer:: open ( "ftp://ftp.isc.org/welcome.msg" ) ;
let result = gofer:: open ( "file:///path/to/file.txt" ) ;
let result = gofer:: open ( "stdin:" ) ;
let result = gofer:: open ( "data:,Hello%2C%20world%21%0A" ) ;
https://docs.rs/gofer/
Scheme
Feature
Summary
data:
data
Inline data in Base64 or URL-encoded format
file:
file
Local file path
ftp:
ftp
FTP
http:
http
HTTP
https:
https
HTTPS
stdin:
stdin
Standard input stream
Crate (Feature)
Version
Usage
Summary
clap ("clap")
4.5
Implements clap::builder::TypedValueParser (TBD)
miette ("miette")
7.5
Derives miette::Diagnostic on gofer::Error
git clone https://github.com/dryrust/gofer.rs.git