pub struct SupportCodesProjection {
pub support_codes: Vec<SupportCode>,
}Expand description
The agent-readable projection of ServerSettings::support_codes, stored
under crate::kv::KEY_SUPPORT_CODES in fleet_config.
server_settings also carries secrets an agent has no business reading
(the installer’s NATS token, in clear at the KV layer, SMTP relay
settings). The support-unlock check needs only the argon2id hashes, so the
backend publishes just those here and agents read this instead. Keep it
that way: Self::from_settings copies support_codes explicitly rather
than cloning the settings and stripping fields, so a field added to
ServerSettings later can never leak into this document by default.
Deliberately no deny_unknown_fields: a future field must not break
agents that predate it.
Fields§
§support_codes: Vec<SupportCode>Implementations§
Source§impl SupportCodesProjection
impl SupportCodesProjection
pub fn from_settings(settings: &ServerSettings) -> Self
Trait Implementations§
Source§impl Clone for SupportCodesProjection
impl Clone for SupportCodesProjection
Source§impl Debug for SupportCodesProjection
impl Debug for SupportCodesProjection
Source§impl Default for SupportCodesProjection
impl Default for SupportCodesProjection
Source§impl<'de> Deserialize<'de> for SupportCodesProjectionwhere
SupportCodesProjection: Default,
impl<'de> Deserialize<'de> for SupportCodesProjectionwhere
SupportCodesProjection: Default,
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 SupportCodesProjection
Source§impl PartialEq for SupportCodesProjection
impl PartialEq for SupportCodesProjection
Source§impl Serialize for SupportCodesProjection
impl Serialize for SupportCodesProjection
impl StructuralPartialEq for SupportCodesProjection
Auto Trait Implementations§
impl Freeze for SupportCodesProjection
impl RefUnwindSafe for SupportCodesProjection
impl Send for SupportCodesProjection
impl Sync for SupportCodesProjection
impl Unpin for SupportCodesProjection
impl UnsafeUnpin for SupportCodesProjection
impl UnwindSafe for SupportCodesProjection
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<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.