matrix_uri
A crate for building and parsing Matrix URIs according to both the matrix.to specification and also MSC2312 (matrix://
).
Optionally provides conversion to types from ruma_identifiers
with the ruma
feature
Usage
Building:
let uri = crate new
.unwrap;
println!; // `chat with @cute:some.url`
println!; // `matrix:u/cute%3Asome.url?action=chat&via=headpat.services&via=cute.local`
println!; // `https://matrix.to/#/%40cute%3Asome.url?action=chat&via=headpat.services&via=cute.local`
Parsing:
let uri = from_str.unwrap;
println!; // `@her:example.org - Chat`
Docs
Can be viewed from source by running cargo doc --open