client-rust
is a library to access Service Binding Specification for Kubernetes conformant Service Binding Workload Projections.
```rust use postgres::{Client, NoTls};
use servicebindings::binding::Binding; use servicebindings::bindings;
fn main() { let b = bindings::fromservicebinding_root(); let c = bindings::filter(b, "postgresql");
if c.len() != 1 {
panic!("Incorrect number of PostgreSQL bindings: {}", c.len())
}
let u = c[0].get("url");
let conn = match u {
None => panic!("No URL in binding"),
Some(u) => Client::connect(u, NoTls),
};
// ...
} ```
Apache License v2.0: see LICENSE for details.