Trait tor_dirclient::request::Requestable
source · [−]pub trait Requestable {
fn make_request(&self) -> Result<Request<()>, RequestError>;
fn partial_docs_ok(&self) -> bool;
fn max_response_len(&self) -> usize { ... }
}Expand description
A request for an object that can be served over the Tor directory system.
Required methods
fn make_request(&self) -> Result<Request<()>, RequestError>
fn make_request(&self) -> Result<Request<()>, RequestError>
Build an http::Request from this Requestable, if
it is well-formed.
fn partial_docs_ok(&self) -> bool
fn partial_docs_ok(&self) -> bool
Return true if partial downloads are potentially useful. This is true for request types where we’re going to be downloading multiple documents.
Provided methods
fn max_response_len(&self) -> usize
fn max_response_len(&self) -> usize
Return the maximum allowable response length we’ll accept for this request.