pub struct ContentCapturePolicy {
pub policy_ref: PolicyRef,
pub mode: ContentCaptureMode,
pub source_permits_content: bool,
pub sink_permits_content: bool,
pub redaction_required: bool,
pub retention_required: bool,
pub sampling_required: bool,
pub byte_limit: u64,
}Expand description
Defines the content capture policy SDK value. Construction records local state only; documented runtimes, executors, or ports own side effects.
Fields§
§policy_ref: PolicyRefPolicy reference that must be resolved by the host or runtime before execution.
mode: ContentCaptureModeMode that selects how this operation or contract should behave. Callers use it to choose the explicit execution path instead of relying on hidden defaults.
source_permits_content: boolWhether source permits content is enabled. Policy, validation, or routing code uses this flag to choose the explicit behavior.
sink_permits_content: boolWhether sink permits content is enabled. Policy, validation, or routing code uses this flag to choose the explicit behavior.
redaction_required: boolWhether redaction required is enabled. Policy, validation, or routing code uses this flag to choose the explicit behavior.
retention_required: boolRetention class for referenced content or records. Stores and telemetry sinks use it to decide how long evidence may be kept.
sampling_required: boolWhether sampling required is enabled. Policy, validation, or routing code uses this flag to choose the explicit behavior.
byte_limit: u64Byte size or byte limit for byte limit. Use it to enforce bounded reads, writes, summaries, or parser output.
Implementations§
Source§impl ContentCapturePolicy
impl ContentCapturePolicy
Sourcepub fn safe_defaults(policy_ref: PolicyRef) -> Self
pub fn safe_defaults(policy_ref: PolicyRef) -> Self
Returns an updated value with safe defaults configured. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn allows_raw_content(&self) -> bool
pub fn allows_raw_content(&self) -> bool
Returns whether allows raw content applies for this state. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Trait Implementations§
Source§impl Clone for ContentCapturePolicy
impl Clone for ContentCapturePolicy
Source§fn clone(&self) -> ContentCapturePolicy
fn clone(&self) -> ContentCapturePolicy
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 ContentCapturePolicy
impl Debug for ContentCapturePolicy
Source§impl<'de> Deserialize<'de> for ContentCapturePolicy
impl<'de> Deserialize<'de> for ContentCapturePolicy
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 ContentCapturePolicy
Source§impl PartialEq for ContentCapturePolicy
impl PartialEq for ContentCapturePolicy
Source§fn eq(&self, other: &ContentCapturePolicy) -> bool
fn eq(&self, other: &ContentCapturePolicy) -> bool
self and other values to be equal, and is used by ==.