Skip to content

Rust API Bindings to the OSI License API

License

Notifications You must be signed in to change notification settings

OpenSourceOrg/rust-opensource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

32 Commits

Repository files navigation

rust-opensource

rust-opensource is an API Wrapper that allows you to query the Open Source License API with Rust.

Install

The crate is called opensource and you can depend on it via cargo:

[dependencies]opensource = "0.2.0"

Documentation can be found at OpenSourceOrg.github.io/rust-opensource.

Examples

externcrate opensource;use opensource::client;fnmain(){let license = client::get("BSD-3").unwrap();println!("{}", license.name);}

A better way is to use match:

externcrate opensource;use opensource::client;fnmain(){let license = client::get("this-license-does-not-exist");match license {Ok(license) => println!("{}", license.name),Err(err) => println!("{}", err),}}

About

Rust API Bindings to the OSI License API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages