pub struct ProtectionContext {
pub destination: DataDestination,
pub tenant_id: Option<TenantId>,
pub is_internal_audit: bool,
}Expand description
Protection context - information needed to make protection decisions
Fields§
§destination: DataDestinationWhere the data is going
tenant_id: Option<TenantId>Tenant context (for tenant-specific policies)
is_internal_audit: boolWhether this is an internal audit export (can decrypt)
Implementations§
Source§impl ProtectionContext
impl ProtectionContext
Sourcepub fn new(destination: DataDestination) -> Self
pub fn new(destination: DataDestination) -> Self
Create a new protection context
Sourcepub fn for_stream() -> Self
pub fn for_stream() -> Self
Create context for streaming to frontend
Sourcepub fn for_storage() -> Self
pub fn for_storage() -> Self
Create context for storage
Sourcepub fn with_tenant(self, tenant_id: TenantId) -> Self
pub fn with_tenant(self, tenant_id: TenantId) -> Self
Add tenant context
Trait Implementations§
Source§impl Clone for ProtectionContext
impl Clone for ProtectionContext
Source§fn clone(&self) -> ProtectionContext
fn clone(&self) -> ProtectionContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProtectionContext
impl RefUnwindSafe for ProtectionContext
impl Send for ProtectionContext
impl Sync for ProtectionContext
impl Unpin for ProtectionContext
impl UnsafeUnpin for ProtectionContext
impl UnwindSafe for ProtectionContext
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