pub struct Http { /* private fields */ }Expand description
The real thing: one HTTP GET.
Implementations§
Source§impl Http
impl Http
Sourcepub fn new(url: &str) -> Self
pub fn new(url: &str) -> Self
A fetcher for url - REGISTRY_URL in production.
The URL is a parameter rather than baked into the request for the same
reason crate::llm::models::Http takes an endpoint: a status check
against a real server is the only thing that can tell a success from a
failure, and one nothing exercises is a mutation survivor. It also lets
a caller point drep at a mirror of the document.
Sourcepub fn with_max_bytes(self, max_bytes: u64) -> Self
pub fn with_max_bytes(self, max_bytes: u64) -> Self
The same fetcher with a different size ceiling.
Exists for the tests that pin the boundary. Production always uses
MAX_DOCUMENT_BYTES, which new applies.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Http
impl RefUnwindSafe for Http
impl Send for Http
impl Sync for Http
impl Unpin for Http
impl UnsafeUnpin for Http
impl UnwindSafe for Http
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