pub struct ScanProfileV1 { /* private fields */ }Expand description
A validated venom.scan-profile/v1 product profile.
The type has no Default implementation: callers must deliberately
choose baseline or web-review. Deserialization is fail-closed and
rejects every unknown field, identifier, schema version, invalid limit, or
capability/scope mismatch.
Implementations§
Source§impl ScanProfileV1
impl ScanProfileV1
Sourcepub fn baseline() -> Result<Self, ScanProfileV1Error>
pub fn baseline() -> Result<Self, ScanProfileV1Error>
Constructs the conservative, single-resource built-in profile.
Sourcepub fn web_review() -> Result<Self, ScanProfileV1Error>
pub fn web_review() -> Result<Self, ScanProfileV1Error>
Constructs bounded exact-origin review with enforcement disabled.
Sourcepub fn for_builtin(
profile: BuiltInScanProfile,
) -> Result<Self, ScanProfileV1Error>
pub fn for_builtin( profile: BuiltInScanProfile, ) -> Result<Self, ScanProfileV1Error>
Constructs one of the exact built-in profiles.
Sourcepub fn for_builtin_id(value: &str) -> Result<Self, ScanProfileSelectionError>
pub fn for_builtin_id(value: &str) -> Result<Self, ScanProfileSelectionError>
Parses an exact built-in identifier and constructs its profile.
Sourcepub const fn profile(&self) -> BuiltInScanProfile
pub const fn profile(&self) -> BuiltInScanProfile
Returns the selected built-in profile.
Sourcepub const fn scope(&self) -> ScanProfileScope
pub const fn scope(&self) -> ScanProfileScope
Returns the profile’s fixed network scope.
Sourcepub const fn capabilities(&self) -> ScanProfileCapabilitiesV1
pub const fn capabilities(&self) -> ScanProfileCapabilitiesV1
Returns the exact executable capability manifest.
Sourcepub const fn limits(&self) -> &ScanProfileLimitsV1
pub const fn limits(&self) -> &ScanProfileLimitsV1
Returns the complete serialized limits contract.
Sourcepub const fn web_assessment_limits(&self) -> WebAssessmentLimits
pub const fn web_assessment_limits(&self) -> WebAssessmentLimits
Returns the checked limits consumed by the assessment runtime.
Sourcepub const fn defense_enforcement_enabled(&self) -> bool
pub const fn defense_enforcement_enabled(&self) -> bool
Returns whether defense enforcement was explicitly enabled.
Sourcepub fn with_limits(
self,
limits: WebAssessmentLimits,
) -> Result<Self, ScanProfileV1Error>
pub fn with_limits( self, limits: WebAssessmentLimits, ) -> Result<Self, ScanProfileV1Error>
Replaces the complete checked limit envelope.
Every baseline dimension remains fixed to the current conservative CLI
envelope. web-review may use any checked, whole-millisecond envelope.
Sourcepub fn with_defense_enforcement_enabled(
self,
enabled: bool,
) -> Result<Self, ScanProfileV1Error>
pub fn with_defense_enforcement_enabled( self, enabled: bool, ) -> Result<Self, ScanProfileV1Error>
Explicitly enables or disables monotonic defense enforcement.
Enforcement is disabled in both built-in constructors. Baseline rejects
an attempt to enable it; only web-review can opt in.
Trait Implementations§
Source§impl Clone for ScanProfileV1
impl Clone for ScanProfileV1
Source§fn clone(&self) -> ScanProfileV1
fn clone(&self) -> ScanProfileV1
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScanProfileV1
impl Debug for ScanProfileV1
Source§impl<'de> Deserialize<'de> for ScanProfileV1
impl<'de> Deserialize<'de> for ScanProfileV1
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>,
impl Eq for ScanProfileV1
Source§impl PartialEq for ScanProfileV1
impl PartialEq for ScanProfileV1
Source§impl Serialize for ScanProfileV1
impl Serialize for ScanProfileV1
impl StructuralPartialEq for ScanProfileV1
Auto Trait Implementations§
impl Freeze for ScanProfileV1
impl RefUnwindSafe for ScanProfileV1
impl Send for ScanProfileV1
impl Sync for ScanProfileV1
impl Unpin for ScanProfileV1
impl UnsafeUnpin for ScanProfileV1
impl UnwindSafe for ScanProfileV1
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.