pub struct WebRepresentation {
pub content_id: ContentId,
pub raw_source_id: ContentId,
pub text: String,
pub codec: String,
pub codec_version: String,
pub media_type: String,
pub charset: Option<String>,
pub language: Option<String>,
pub fidelity_warnings: Vec<String>,
}Expand description
Immutable normalized text and the provenance required to interpret it.
Fields§
§content_id: ContentId§raw_source_id: ContentId§text: String§codec: String§codec_version: String§media_type: String§charset: Option<String>§language: Option<String>§fidelity_warnings: Vec<String>Implementations§
Source§impl WebRepresentation
impl WebRepresentation
pub fn checked( raw_source_id: ContentId, text: String, metadata: RepresentationMetadata, limits: DecodeLimits, ) -> Result<Self, WebRecordError>
Sourcepub fn select(
&self,
start: u32,
end: u32,
) -> Result<EvidenceSelector, WebRecordError>
pub fn select( &self, start: u32, end: u32, ) -> Result<EvidenceSelector, WebRecordError>
Select Unicode scalar offsets from this immutable representation.
Trait Implementations§
Source§impl Clone for WebRepresentation
impl Clone for WebRepresentation
Source§fn clone(&self) -> WebRepresentation
fn clone(&self) -> WebRepresentation
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 WebRepresentation
impl Debug for WebRepresentation
impl Eq for WebRepresentation
Source§impl PartialEq for WebRepresentation
impl PartialEq for WebRepresentation
impl StructuralPartialEq for WebRepresentation
Auto Trait Implementations§
impl Freeze for WebRepresentation
impl RefUnwindSafe for WebRepresentation
impl Send for WebRepresentation
impl Sync for WebRepresentation
impl Unpin for WebRepresentation
impl UnsafeUnpin for WebRepresentation
impl UnwindSafe for WebRepresentation
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