Rust

Crate root

Module
What utopia_dsn defines at its root.

Contents

use utopia_dsn::Dsn;
Rust
pub struct Dsn

A parsed DSN.

Its `Debug` output hides the password
Rust
use utopia_dsn::Dsn;

let dsn = Dsn::parse("redis://default:secret@cache:6379")?;
let printed = format!("{dsn:?}");
assert!(printed.contains("cache"));
assert!(!printed.contains("secret"));
Also implements Debug.
use utopia_dsn::Error;
Rust
pub enum Error

Why a DSN was refused or a parameter could not be read.