pub struct EvidenceSelector {
pub representation_id: ContentId,
pub start: u32,
pub end: u32,
pub exact: String,
pub prefix: Option<String>,
pub suffix: Option<String>,
pub structural_path: Option<Vec<String>>,
}Expand description
A quote anchored to Unicode scalar offsets and optional context/path.
Fields§
§representation_id: ContentId§start: u32§end: u32§exact: String§prefix: Option<String>§suffix: Option<String>§structural_path: Option<Vec<String>>Implementations§
Source§impl EvidenceSelector
impl EvidenceSelector
pub fn checked( representation_id: ContentId, start: u32, end: u32, exact: String, text: &str, ) -> Result<Self, WebRecordError>
pub fn with_context( self, prefix: Option<String>, suffix: Option<String>, structural_path: Option<Vec<String>>, ) -> Self
pub fn verify(&self, rep: &WebRepresentation) -> Result<(), WebRecordError>
pub fn to_datum(&self) -> Datum
pub fn from_datum( value: &Datum, rep: &WebRepresentation, limits: DecodeLimits, ) -> Result<Self, WebRecordError>
Trait Implementations§
Source§impl Clone for EvidenceSelector
impl Clone for EvidenceSelector
Source§fn clone(&self) -> EvidenceSelector
fn clone(&self) -> EvidenceSelector
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 EvidenceSelector
impl Debug for EvidenceSelector
impl Eq for EvidenceSelector
Source§impl PartialEq for EvidenceSelector
impl PartialEq for EvidenceSelector
impl StructuralPartialEq for EvidenceSelector
Auto Trait Implementations§
impl Freeze for EvidenceSelector
impl RefUnwindSafe for EvidenceSelector
impl Send for EvidenceSelector
impl Sync for EvidenceSelector
impl Unpin for EvidenceSelector
impl UnsafeUnpin for EvidenceSelector
impl UnwindSafe for EvidenceSelector
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