pub struct SttpContentSlice { /* private fields */ }Expand description
A content-layer contribution limited to top-level keys.
Keys must use the canonical confidence signature: field_name(.confidence).
Implementations§
Source§impl SttpContentSlice
impl SttpContentSlice
pub fn new() -> Self
Sourcepub fn field(
self,
name: impl Into<String>,
confidence: f32,
value: Value,
) -> Result<Self, SttpDocumentBuildError>
pub fn field( self, name: impl Into<String>, confidence: f32, value: Value, ) -> Result<Self, SttpDocumentBuildError>
Insert a top-level content field with an explicit confidence annotation.
Sourcepub fn from_confidence_map(
map: Map<String, Value>,
) -> Result<Self, SttpDocumentBuildError>
pub fn from_confidence_map( map: Map<String, Value>, ) -> Result<Self, SttpDocumentBuildError>
Build a slice from a map whose keys already include confidence signatures.
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Trait Implementations§
Source§impl Clone for SttpContentSlice
impl Clone for SttpContentSlice
Source§fn clone(&self) -> SttpContentSlice
fn clone(&self) -> SttpContentSlice
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 SttpContentSlice
impl Debug for SttpContentSlice
Source§impl Default for SttpContentSlice
impl Default for SttpContentSlice
Source§fn default() -> SttpContentSlice
fn default() -> SttpContentSlice
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SttpContentSlice
impl RefUnwindSafe for SttpContentSlice
impl Send for SttpContentSlice
impl Sync for SttpContentSlice
impl Unpin for SttpContentSlice
impl UnsafeUnpin for SttpContentSlice
impl UnwindSafe for SttpContentSlice
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