Crates.io | dbus-server-address-parser |
lib.rs | dbus-server-address-parser |
version | 1.0.1 |
source | src |
created_at | 2021-07-10 10:54:03.215268 |
updated_at | 2021-07-11 19:19:15.30131 |
description | Library to encode and decode DBus server address |
homepage | |
repository | https://github.com/LinkTed/dbus-server-address-parser |
max_upload_size | |
id | 421054 |
size | 54,498 |
A library to encode and decode DBus server address.
Add this to your Cargo.toml
:
[dependencies]
dbus-server-address-parser = "~1.0.1"
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);
}