pub struct ShellPiiRegistry { /* private fields */ }Expand description
Runtime-local registry of shell-scoped PII markers. Populated from
the shell manifest at load time; subsequent encrypt / decrypt paths
look up the marker by its wire pii_code rather than carrying a
generic type parameter.
Duplicate registrations and out-of-range codes are refused; the registry is otherwise append-only (sunset flow mirrors the shell sunset policy and is out of scope for this module).
Implementations§
Source§impl ShellPiiRegistry
impl ShellPiiRegistry
Sourcepub fn register(&mut self, entry: ShellPiiType) -> Result<(), PiiError>
pub fn register(&mut self, entry: ShellPiiType) -> Result<(), PiiError>
Register a shell PII marker. Rejects if pii_code is outside
0x0100..=0xFFFF or has already been registered.
Sourcepub fn get(&self, pii_code: u16) -> Option<&ShellPiiType>
pub fn get(&self, pii_code: u16) -> Option<&ShellPiiType>
Look up a registered marker by its wire tag. Returns None
when the code is unregistered — callers treat that as a shell
drift and refuse the operation.
Trait Implementations§
Source§impl Debug for ShellPiiRegistry
impl Debug for ShellPiiRegistry
Source§impl Default for ShellPiiRegistry
impl Default for ShellPiiRegistry
Source§fn default() -> ShellPiiRegistry
fn default() -> ShellPiiRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ShellPiiRegistry
impl RefUnwindSafe for ShellPiiRegistry
impl Send for ShellPiiRegistry
impl Sync for ShellPiiRegistry
impl Unpin for ShellPiiRegistry
impl UnsafeUnpin for ShellPiiRegistry
impl UnwindSafe for ShellPiiRegistry
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