chromaframe_sdk/
privacy.rs1use std::fmt;
2
3#[derive(Clone, PartialEq, Eq)]
4pub struct SecretString(String);
5
6impl SecretString {
7 #[must_use]
8 pub fn new(value: impl Into<String>) -> Self {
9 Self(value.into())
10 }
11 #[must_use]
12 pub fn expose(&self) -> &str {
13 &self.0
14 }
15}
16
17impl fmt::Debug for SecretString {
18 fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
19 formatter.write_str("[REDACTED]")
20 }
21}
22
23#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
24pub struct StoragePolicy {
25 pub retain_metadata: bool,
26 pub log_payloads: bool,
27}