pub struct SensitivePaymentDataGuardrail { /* private fields */ }Available on crate feature
payments only.Expand description
Content redactor for card data, billing PII, and signed payment artifacts.
Implementations§
Source§impl SensitivePaymentDataGuardrail
impl SensitivePaymentDataGuardrail
Sourcepub fn new() -> SensitivePaymentDataGuardrail
pub fn new() -> SensitivePaymentDataGuardrail
Creates a new payment-data redactor.
Sourcepub fn redact_text(&self, text: &str) -> String
pub fn redact_text(&self, text: &str) -> String
Redacts sensitive payment material from plain text.
Sourcepub fn redact_content(&self, content: &Content) -> Content
pub fn redact_content(&self, content: &Content) -> Content
Redacts sensitive payment material from ADK content parts.
Sourcepub fn redact_json(&self, value: &Value) -> Value
pub fn redact_json(&self, value: &Value) -> Value
Redacts sensitive payment material from JSON payloads.
Trait Implementations§
Source§impl Default for SensitivePaymentDataGuardrail
impl Default for SensitivePaymentDataGuardrail
Source§fn default() -> SensitivePaymentDataGuardrail
fn default() -> SensitivePaymentDataGuardrail
Returns the “default value” for a type. Read more
Source§impl Guardrail for SensitivePaymentDataGuardrail
impl Guardrail for SensitivePaymentDataGuardrail
Source§fn validate<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 Content,
) -> Pin<Box<dyn Future<Output = GuardrailResult> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
SensitivePaymentDataGuardrail: 'async_trait,
fn validate<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 Content,
) -> Pin<Box<dyn Future<Output = GuardrailResult> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
SensitivePaymentDataGuardrail: 'async_trait,
Validate content and return result
Source§fn run_parallel(&self) -> bool
fn run_parallel(&self) -> bool
Whether to run in parallel with other guardrails (default: true)
Auto Trait Implementations§
impl Freeze for SensitivePaymentDataGuardrail
impl RefUnwindSafe for SensitivePaymentDataGuardrail
impl Send for SensitivePaymentDataGuardrail
impl Sync for SensitivePaymentDataGuardrail
impl Unpin for SensitivePaymentDataGuardrail
impl UnsafeUnpin for SensitivePaymentDataGuardrail
impl UnwindSafe for SensitivePaymentDataGuardrail
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