pub struct Client { /* private fields */ }Expand description
One document, one server, and a typed way to call anything in it.
Implementations§
Source§impl Client
impl Client
Sourcepub fn over(document: Document) -> Result<Self, Error>
pub fn over(document: Document) -> Result<Self, Error>
The one constructor: a reduction that is already in hand.
A shipped binary gets that reduction from Document::from_blob, which
is all it can do — the reader is a cargo feature and the binary does not
enable it. A bless step, which does, writes
Client::over(Document::load(document, overlay)?) and handles the load
failure under its own type, so no shape on this page depends on which
build a reader is looking at.
Sourcepub fn with_base(self, base: Uri) -> Self
pub fn with_base(self, base: Uri) -> Self
Point at a different server than the document’s first one.
pub fn base(&self) -> &Uri
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
impl UnwindSafe for Client
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