pub struct Remark {
pub ty: RemarkType,
pub rule_id: String,
pub range: Option<Range>,
}
Expand description
Information on a modified section in a string.
Fields§
§ty: RemarkType
The kind of redaction that has been applied on the target value.
rule_id: String
Unique identifier of the data scrubbing or normalization rule that caused the modification.
range: Option<Range>
The inclusive start and exclusive end indices of this remark.
Implementations§
source§impl Remark
impl Remark
sourcepub fn new<S: Into<String>>(ty: RemarkType, rule_id: S) -> Self
pub fn new<S: Into<String>>(ty: RemarkType, rule_id: S) -> Self
Creates a new remark.
sourcepub fn with_range<S: Into<String>>(
ty: RemarkType,
rule_id: S,
range: Range,
) -> Self
pub fn with_range<S: Into<String>>( ty: RemarkType, rule_id: S, range: Range, ) -> Self
Creates a new text remark with range indices.
sourcepub fn ty(&self) -> RemarkType
pub fn ty(&self) -> RemarkType
Returns the type.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Remark
impl<'de> Deserialize<'de> for Remark
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Remark
Auto Trait Implementations§
impl Freeze for Remark
impl RefUnwindSafe for Remark
impl Send for Remark
impl Sync for Remark
impl Unpin for Remark
impl UnwindSafe for Remark
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)