pub struct MaskingPipeline { /* private fields */ }Expand description
脱敏管道:按顺序执行多个脱敏阶段。
每个阶段的输出是下一阶段的输入,允许组合不同粒度的脱敏操作。 例如:阶段 1 按字段类型脱敏,阶段 2 对残留的敏感字段哈希脱敏。
Implementations§
Source§impl MaskingPipeline
impl MaskingPipeline
Sourcepub fn add_stage(self, stage: PipelineStage) -> Self
pub fn add_stage(self, stage: PipelineStage) -> Self
添加阶段(链式)
Sourcepub fn stage_count(&self) -> usize
pub fn stage_count(&self) -> usize
阶段数
Sourcepub fn stage_names(&self) -> Vec<&str>
pub fn stage_names(&self) -> Vec<&str>
阶段名称列表
Sourcepub fn apply_to_map(
&self,
data: &HashMap<String, String>,
) -> HashMap<String, String>
pub fn apply_to_map( &self, data: &HashMap<String, String>, ) -> HashMap<String, String>
对 HashMap 按顺序执行所有阶段
Sourcepub fn apply_to_json(&self, json: &str) -> String
pub fn apply_to_json(&self, json: &str) -> String
对 JSON 按顺序执行所有阶段
Trait Implementations§
Source§impl Clone for MaskingPipeline
impl Clone for MaskingPipeline
Source§fn clone(&self) -> MaskingPipeline
fn clone(&self) -> MaskingPipeline
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MaskingPipeline
impl Debug for MaskingPipeline
Source§impl Default for MaskingPipeline
impl Default for MaskingPipeline
Source§fn default() -> MaskingPipeline
fn default() -> MaskingPipeline
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MaskingPipeline
impl RefUnwindSafe for MaskingPipeline
impl Send for MaskingPipeline
impl Sync for MaskingPipeline
impl Unpin for MaskingPipeline
impl UnsafeUnpin for MaskingPipeline
impl UnwindSafe for MaskingPipeline
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