pub struct CredBundle {
pub schema_version: u16,
pub backends: BTreeMap<String, BackendCred>,
pub deposit: DepositMaterial,
}Expand description
The decrypted per-backend credential map.
This is the AEAD plaintext of the sealed payload (§2.3). It holds the broker’s own bootstrap credentials, the secrets it needs to authenticate to each backend, and nothing else.
Fields§
§schema_version: u16Payload schema version (see CRED_SCHEMA_VERSION).
backends: BTreeMap<String, BackendCred>Opaque backend id → credential. The id is the same string the catalog routes keys to.
deposit: DepositMaterialSealed credential-deposit material. The ingest private key and contributor allow-list live inside the encrypted payload; append-only deposit records outside the payload are useless without this material.
Implementations§
Source§impl CredBundle
impl CredBundle
Sourcepub fn set(&mut self, backend_id: impl Into<String>, cred: BackendCred)
pub fn set(&mut self, backend_id: impl Into<String>, cred: BackendCred)
Insert or replace the credential for backend_id.
Sourcepub fn ensure_deposit_identity(&mut self)
pub fn ensure_deposit_identity(&mut self)
Ensure this bundle has an ingest identity for public credential deposits.
Sourcepub fn deposit_recipient(&self) -> Option<[u8; 32]>
pub fn deposit_recipient(&self) -> Option<[u8; 32]>
Return the public deposit recipient when an ingest identity exists.
Trait Implementations§
Source§impl Clone for CredBundle
impl Clone for CredBundle
Source§fn clone(&self) -> CredBundle
fn clone(&self) -> CredBundle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CredBundle
impl Debug for CredBundle
Source§impl Default for CredBundle
impl Default for CredBundle
Source§impl<'de> Deserialize<'de> for CredBundle
impl<'de> Deserialize<'de> for CredBundle
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
Auto Trait Implementations§
impl Freeze for CredBundle
impl RefUnwindSafe for CredBundle
impl Send for CredBundle
impl Sync for CredBundle
impl Unpin for CredBundle
impl UnsafeUnpin for CredBundle
impl UnwindSafe for CredBundle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request