#encode-decode #decode #encode #parser

dbus-server-address-parser

Library to encode and decode DBus server address

2 stable releases

1.0.1 Jul 11, 2021
1.0.0 Jul 10, 2021

#2567 in Parser implementations


Used in 2 crates (via dbus-async)

BSD-3-Clause

48KB
1.5K SLoC

dbus-server-address-parser

A library to encode and decode DBus server address. Build status Dependency status Code coverage Latest version License

Usage

Add this to your Cargo.toml:

[dependencies]
dbus-server-address-parser = "~1.0.1"

Example

use dbus_server_address_parser::Address;

fn main() {
    let addresses_str = "unix:abstract=/tmp/dbus-U8OSdmf7;tcp:host=127.0.0.1,port=30958";
    // Decode address
    let addresses = Address::decode(addresses_str).unwrap();
    // Encode address
    let addresses_string = Address::encode(&addresses);

    println!("{}", addresses_string);
}

Dependencies

~290–750KB
~18K SLoC