Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abiriadev/digital-link-rs
GS1 Digital Link implementation for Rust
https://github.com/abiriadev/digital-link-rs
digital-link gs1 gs1-digital-link implementation rust
Last synced: about 1 month ago
JSON representation
GS1 Digital Link implementation for Rust
- Host: GitHub
- URL: https://github.com/abiriadev/digital-link-rs
- Owner: abiriadev
- Created: 2023-08-22T06:12:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-05T08:54:59.000Z (over 1 year ago)
- Last Synced: 2024-10-14T01:26:24.168Z (2 months ago)
- Topics: digital-link, gs1, gs1-digital-link, implementation, rust
- Language: Rust
- Homepage:
- Size: 65.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Digital Link for Rust
[see gs1 digital link specification](https://www.gs1us.org/industries-and-insights/standards/gs1-digital-link)
## Example
```rs
use digital_link_rs::{self, DigitalLink, Gs1Path};fn main() {
let digital_link = DigitalLink::try_from_str("https://id.gs1.org/00/195201234567891232?02=09520123456788&37=25&10=ABC12&17=180426").expect("parsing error");if let Gs1Path::Sscc(sscc) = digital_link.gs1_path {
println!("sscc: {sscc}");
}if let Some(date) = digital_link.data_attributes.expiry_date {
println!("expiry date: {date}");
}
}
```