pub struct ContainmentSupport { /* private fields */ }Expand description
The platform backend’s dimensioned ability to enforce the requested containment policy.
Callers can inspect this report but cannot manufacture one.
use tapid_runner::ContainmentSupport;
fn inspect(report: &ContainmentSupport) {
let _: bool = report.is_supported();
let _: Option<&str> = report.platform();
}ⓘ
use tapid_runner::{BackendIdentity, ContainmentSupport, EnforcementDimensions};
let none = EnforcementDimensions::none();
let _ = ContainmentSupport::Supported {
backend: BackendIdentity::new("fake", "1", None).unwrap(),
requested: none.clone(), declared: none.clone(), observed: none,
declared_evidence: vec![], observed_evidence: vec![],
};Implementations§
Source§impl ContainmentSupport
impl ContainmentSupport
pub fn is_supported(&self) -> bool
Sourcepub fn platform(&self) -> Option<&str>
pub fn platform(&self) -> Option<&str>
Platform named by the backend report. The report remains non-forgeable because all fields and constructors are private while these accessors make its claims inspectable.
pub fn backend(&self) -> &BackendIdentity
pub fn requested(&self) -> &EnforcementDimensions
Sourcepub fn declared(&self) -> &EnforcementDimensions
pub fn declared(&self) -> &EnforcementDimensions
Compatibility summary. Prefer Self::declared_evidence.
Sourcepub fn observed(&self) -> &EnforcementDimensions
pub fn observed(&self) -> &EnforcementDimensions
Compatibility summary. Prefer Self::observed_evidence.
pub fn declared_evidence(&self) -> &[DimensionEvidence]
pub fn observed_evidence(&self) -> &[DimensionEvidence]
Sourcepub fn enforceable(&self) -> &EnforcementDimensions
pub fn enforceable(&self) -> &EnforcementDimensions
Compatibility alias for Self::declared.
pub fn unsupported_reason(&self) -> Option<&str>
Trait Implementations§
Source§impl Clone for ContainmentSupport
impl Clone for ContainmentSupport
Source§impl Debug for ContainmentSupport
impl Debug for ContainmentSupport
impl Eq for ContainmentSupport
Source§impl PartialEq for ContainmentSupport
impl PartialEq for ContainmentSupport
impl StructuralPartialEq for ContainmentSupport
Auto Trait Implementations§
impl Forget for ContainmentSupport
impl Freeze for ContainmentSupport
impl Move for ContainmentSupport
impl RefUnwindSafe for ContainmentSupport
impl Send for ContainmentSupportwhere
RawVecInner: Send,
impl Sync for ContainmentSupportwhere
RawVecInner: Sync,
impl Unpin for ContainmentSupport
impl UnsafeUnpin for ContainmentSupportwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<DimensionEvidence>: UnsafeUnpin,
impl UnwindSafe for ContainmentSupportwhere
RawVecInner: UnwindSafe,
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