pub struct LogOrigin(/* private fields */);Expand description
Validated log origin string (e.g., "auths.dev/log").
Must be non-empty ASCII with no control characters.
Args:
- Inner
String— validated ASCII origin.
Usage:
ⓘ
let origin = LogOrigin::new("auths.dev/log")?;Implementations§
Source§impl LogOrigin
impl LogOrigin
Sourcepub fn new(s: &str) -> Result<Self, TransparencyError>
pub fn new(s: &str) -> Result<Self, TransparencyError>
Create a new log origin, validating that it is non-empty ASCII.
Sourcepub fn new_unchecked(s: &str) -> Self
pub fn new_unchecked(s: &str) -> Self
Create from a compile-time constant. Panics if invalid.
Only for use in default_config() and similar contexts where the
string is a known-good constant.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogOrigin
impl<'de> Deserialize<'de> for LogOrigin
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LogOrigin
impl StructuralPartialEq for LogOrigin
Auto Trait Implementations§
impl Freeze for LogOrigin
impl RefUnwindSafe for LogOrigin
impl Send for LogOrigin
impl Sync for LogOrigin
impl Unpin for LogOrigin
impl UnsafeUnpin for LogOrigin
impl UnwindSafe for LogOrigin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.