pub struct SttpDocumentBuilder { /* private fields */ }Expand description
Fluent builder: metadata → shallow content merges → built document.
Implementations§
Source§impl SttpDocumentBuilder
impl SttpDocumentBuilder
pub fn new(metadata: SttpDocumentMetadata) -> Self
Sourcepub fn merge(
self,
slice: SttpContentSlice,
) -> Result<Self, SttpDocumentBuildError>
pub fn merge( self, slice: SttpContentSlice, ) -> Result<Self, SttpDocumentBuildError>
Shallow-merge a content slice at the top-level key layer only.
Duplicate field names (ignoring confidence) are rejected.
Sourcepub fn build(self) -> Result<SttpDocument, SttpDocumentBuildError>
pub fn build(self) -> Result<SttpDocument, SttpDocumentBuildError>
Finalize metrics and produce a document ready for canonical render.
Trait Implementations§
Source§impl Clone for SttpDocumentBuilder
impl Clone for SttpDocumentBuilder
Source§fn clone(&self) -> SttpDocumentBuilder
fn clone(&self) -> SttpDocumentBuilder
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 moreAuto Trait Implementations§
impl Freeze for SttpDocumentBuilder
impl RefUnwindSafe for SttpDocumentBuilder
impl Send for SttpDocumentBuilder
impl Sync for SttpDocumentBuilder
impl Unpin for SttpDocumentBuilder
impl UnsafeUnpin for SttpDocumentBuilder
impl UnwindSafe for SttpDocumentBuilder
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