Skip to main content

RedactSerialize

Trait RedactSerialize 

Source
pub trait RedactSerialize {
    // Required method
    fn serialize_redacted<S>(
        &self,
        serializer: S,
        policy: &RedactionPolicy,
    ) -> Result<S::Ok, S::Error>
       where S: Serializer;
}
Expand description

Legacy structured-redaction hook for manually implemented container adapters. Derived domain values use the projection capability instead.

Required Methods§

Source

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes this value through a caller-supplied policy.

§Errors

Propagates admission or downstream serialization failures.

§Type Parameters
  • S: Downstream serializer defining the result and error types.
§Parameters
  • serializer: Destination receiving the policy-selected representation.
  • policy: Immutable policy supplied by the enclosing scoped adapter.
§Returns

The downstream result after the admitted representation is serialized.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<A: RedactSerialize, B: RedactSerialize, C: RedactSerialize, D: RedactSerialize, E: RedactSerialize, F: RedactSerialize, G: RedactSerialize, H: RedactSerialize, I: RedactSerialize, J: RedactSerialize, K: RedactSerialize, L: RedactSerialize> RedactSerialize for (A, B, C, D, E, F, G, H, I, J, K, L)

Source§

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes contained redacted values through the active policy scope.

§Errors

Propagates child serialization and shared-budget failures.

Source§

impl<A: RedactSerialize, B: RedactSerialize, C: RedactSerialize, D: RedactSerialize, E: RedactSerialize, F: RedactSerialize, G: RedactSerialize, H: RedactSerialize, I: RedactSerialize, J: RedactSerialize, K: RedactSerialize> RedactSerialize for (A, B, C, D, E, F, G, H, I, J, K)

Source§

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes contained redacted values through the active policy scope.

§Errors

Propagates child serialization and shared-budget failures.

Source§

impl<A: RedactSerialize, B: RedactSerialize, C: RedactSerialize, D: RedactSerialize, E: RedactSerialize, F: RedactSerialize, G: RedactSerialize, H: RedactSerialize, I: RedactSerialize, J: RedactSerialize> RedactSerialize for (A, B, C, D, E, F, G, H, I, J)

Source§

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes contained redacted values through the active policy scope.

§Errors

Propagates child serialization and shared-budget failures.

Source§

impl<A: RedactSerialize, B: RedactSerialize, C: RedactSerialize, D: RedactSerialize, E: RedactSerialize, F: RedactSerialize, G: RedactSerialize, H: RedactSerialize, I: RedactSerialize> RedactSerialize for (A, B, C, D, E, F, G, H, I)

Source§

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes contained redacted values through the active policy scope.

§Errors

Propagates child serialization and shared-budget failures.

Source§

impl<A: RedactSerialize, B: RedactSerialize, C: RedactSerialize, D: RedactSerialize, E: RedactSerialize, F: RedactSerialize, G: RedactSerialize, H: RedactSerialize> RedactSerialize for (A, B, C, D, E, F, G, H)

Source§

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes contained redacted values through the active policy scope.

§Errors

Propagates child serialization and shared-budget failures.

Source§

impl<A: RedactSerialize, B: RedactSerialize, C: RedactSerialize, D: RedactSerialize, E: RedactSerialize, F: RedactSerialize, G: RedactSerialize> RedactSerialize for (A, B, C, D, E, F, G)

Source§

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes contained redacted values through the active policy scope.

§Errors

Propagates child serialization and shared-budget failures.

Source§

impl<A: RedactSerialize, B: RedactSerialize, C: RedactSerialize, D: RedactSerialize, E: RedactSerialize, F: RedactSerialize> RedactSerialize for (A, B, C, D, E, F)

Source§

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes contained redacted values through the active policy scope.

§Errors

Propagates child serialization and shared-budget failures.

Source§

impl<A: RedactSerialize, B: RedactSerialize, C: RedactSerialize, D: RedactSerialize, E: RedactSerialize> RedactSerialize for (A, B, C, D, E)

Source§

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes contained redacted values through the active policy scope.

§Errors

Propagates child serialization and shared-budget failures.

Source§

impl<A: RedactSerialize, B: RedactSerialize, C: RedactSerialize, D: RedactSerialize> RedactSerialize for (A, B, C, D)

Source§

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes contained redacted values through the active policy scope.

§Errors

Propagates child serialization and shared-budget failures.

Source§

impl<A: RedactSerialize, B: RedactSerialize, C: RedactSerialize> RedactSerialize for (A, B, C)

Source§

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes contained redacted values through the active policy scope.

§Errors

Propagates child serialization and shared-budget failures.

Source§

impl<A: RedactSerialize, B: RedactSerialize> RedactSerialize for (A, B)

Source§

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes contained redacted values through the active policy scope.

§Errors

Propagates child serialization and shared-budget failures.

Source§

impl<A: RedactSerialize> RedactSerialize for (A,)

Source§

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes contained redacted values through the active policy scope.

§Errors

Propagates child serialization and shared-budget failures.

Source§

impl<T: RedactSerialize + ?Sized> RedactSerialize for Arc<T>

Source§

fn serialize_redacted<S: Serializer>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>

Preserves the active policy and destination serializer.

Source§

impl<T: RedactSerialize + ?Sized> RedactSerialize for Box<T>

Source§

fn serialize_redacted<S: Serializer>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>

Preserves the active policy and destination serializer.

Source§

impl<T: RedactSerialize + ?Sized> RedactSerialize for Rc<T>

Source§

fn serialize_redacted<S: Serializer>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>

Preserves the active policy and destination serializer.

Source§

impl<T: RedactSerialize, const N: usize> RedactSerialize for [T; N]

Source§

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes contained redacted values through the active policy scope.

§Errors

Propagates child serialization and shared-budget failures.

Source§

impl<T: RedactSerialize> RedactSerialize for Option<T>

Source§

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes contained redacted values through the active policy scope.

§Errors

Propagates child serialization and shared-budget failures.

Source§

impl<T: RedactSerialize> RedactSerialize for Vec<T>

Source§

fn serialize_redacted<S>( &self, serializer: S, policy: &RedactionPolicy, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serializes contained redacted values through the active policy scope.

§Errors

Propagates child serialization and shared-budget failures.

Implementors§