pub struct AccountRef {
pub value: String,
pub provenance: AccountRefProvenance,
}Expand description
An account identity value bundled with how it was obtained.
Bundled rather than parallel fields, so the bug-causing states — a value with no provenance, or a provenance with no value — are unrepresentable. Absent identity carries no provenance because there is nothing to qualify.
Fields§
§value: StringThe identity value as the provider disclosed it (an email, an account id, an org slug — whatever the source speaks).
provenance: AccountRefProvenanceWhich staleness story produced Self::value. See
AccountRefProvenance for why the two must never be conflated.
Trait Implementations§
Source§impl Clone for AccountRef
impl Clone for AccountRef
Source§impl Debug for AccountRef
impl Debug for AccountRef
Source§impl<'de> Deserialize<'de> for AccountRef
impl<'de> Deserialize<'de> for AccountRef
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 AccountRef
Source§impl PartialEq for AccountRef
impl PartialEq for AccountRef
Source§impl Serialize for AccountRef
impl Serialize for AccountRef
impl StructuralPartialEq for AccountRef
Auto Trait Implementations§
impl Freeze for AccountRef
impl RefUnwindSafe for AccountRef
impl Send for AccountRef
impl Sync for AccountRef
impl Unpin for AccountRef
impl UnsafeUnpin for AccountRef
impl UnwindSafe for AccountRef
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