Rust parser/validator for Debian version strings

Overview

debian version handling in rust

This simple crate provides a struct for parsing, validating, manipulating and comparing Debian version strings.

It aims to follow the version specification as described in Debian policy 5.6.12.

Example:

use debversion::Version;

let version: Version = "1.0-1".parse()?;
assert_eq!(version.epoch, Some(0));
assert_eq!(version.upstream_version, "1.0");
assert_eq!(version.debian_revision, Some("1"));

let version1: Version = "1.0-0".parse()?;
let version2: Version = "1.0".parse()?;
assert_eq!(version1, version2);

let version1: Version = "1.0-1".parse()?;
let version2: Version = "1.0~alpha1-1".parse()?;
assert!(version2 < version1);

Features

sqlx

The sqlx feature adds serialization support for the postgres debversion extension when using sqlx.

python-debian

The python-debian feature provides conversion support between the debversion Rust type and the Version class provided by python-debian.

You might also like...
A version control system implemented from scratch in Rust.

Version Control An experiment to write a version control system from scratch in Rust. CLI Usage Usage: revtool COMMAND Commands: init initia

A better rust version of pokeget.

pokeget-rs A better rust version of pokeget. Usage pokeget pokemon for more info, run pokeget --help Also, if you're using pokeget in your bashrc, t

Truly universal encoding detector in pure Rust - port of Python version

Charset Normalizer A library that helps you read text from an unknown charset encoding. Motivated by original Python version of charset-normalizer, I'

An over-simplified version control system written in Rust, similar to Git, for local files (Incomplete)

Vault Vault will be a command line tool (if successful) similar to git which would have multiple features like brances etc etc. __ __ _ _

An experimental project for rust version of Hertz written by GPT4.

Ryze: An experimental Rust Web Framework Ryze is a minimal web framework for Rust inspired by Hertz and written by GPT4. Example Here is a simple exam

Rust version of webpack/enhanced-resolve
Rust version of webpack/enhanced-resolve

Oxc Resolver Rust port of enhanced-resolve. built-in tsconfig-paths-webpack-plugin support extending tsconfig defined in tsconfig.extends support path

A simple Rust version of goctl

goctl-rs A simple Rust version of goctl Support type struct many type struct nest type struct service block API block Structure token.rs - Tokenize th

IntelliJ version of the Afterglow Sublime Text theme
IntelliJ version of the Afterglow Sublime Text theme

Afterglow IntelliJ This theme for IntelliJ is based on the the Afterglow Sublime Text theme, and replaces the default sidebar icons and colour of Inte

Nvm - Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

Node Version Manager Table of Contents Intro About Installing and Updating Install & Update Script Additional Notes Troubleshooting on Linux Troublesh

Owner
Jelmer Vernooij
Jelmer Vernooij
Vari (Väri) is a Rust library for formatting strings with colors and cosmetic stuff to the terminal.

Vari Vari (Väri) is a Rust library for formatting strings with colors and cosmetic stuff to the terminal. Like Rich library for Python. Väri means "co

azur 13 Nov 2, 2022
Easy access of struct fields in strings using different/custom pre/postfix: "Hello, {field}" in rust

Easy access to struct fields in strings ?? add strung to the dependencies in the Cargo.toml: [dependencies] strung = "0.1.3" ?? use/import everything

Dekirisu 2 Sep 19, 2022
Immutable strings, in Rust.

Immutable Strings Inspired by the bytes crate, which offers zero-copy byte slices, this crate does the same but for strings. It is backed by standard

Patrick Elsen 202 Apr 6, 2023
Statically verified Rust struct field names as strings.

field Statically verified struct field names as strings. See the documentation for more details. Installation Add the following to your Cargo manifest

Indraneel Mahendrakumar 3 Jul 9, 2023
Small CLI for escaping and unescaping characters in strings

?? esc Small CLI for escaping characters in strings. Install cargo install esc Usage cat LICENSE-MIT | esc escape | pbcopy pbpaste | esc unescape | pb

Seth 1 Nov 26, 2021
Vim plugin to quickly parse strings into arrays.

butcher Vim plugin to quickly parse strings into arrays. It is painful to write arrays in any programming language, so butcher makes it easy for you.

null 5 Dec 31, 2021
A CLI tool to rename files to randomly generated strings.

rng-rename A CLI tool to rename files to randomly generated strings. Why? Suppose you downloaded a few hundred images to use as your desktop wallpaper

null 2 Feb 24, 2022
A small command-line utility for encoding and decoding bech32 strings

A small command-line utility for encoding and decoding bech32 strings.

Charlie Moog 5 Dec 26, 2022
A more intuitive version of du in rust

A more intuitive version of du in rust

andy.boot 3k Sep 20, 2021
Vyper-Compiler Version Manager in Rust

Vyper Compiler Version Manager in Rust Install $ cargo install --git https://github.com/storming0x/vvm-rs --locked vvm-rs Install from source $ git c

Storming0x 26 Dec 15, 2022