pub struct EasyBuilder { /* private fields */ }
Expand description
The builder struct for curl::easy::Easy
handler.
See the API document of curl-rust
for detailed descriptions
that Easy
API provides.
All errors occured during building operations will be stored in a internal Vec
,
and exposed at finalization, which is when the builder’s build()
method is called.
Implementations§
Source§impl EasyBuilder
impl EasyBuilder
Sourcepub fn new() -> EasyBuilder
pub fn new() -> EasyBuilder
pub fn verbose(&mut self, verbose: bool) -> &mut EasyBuilder
pub fn show_header(&mut self, show: bool) -> &mut EasyBuilder
pub fn progress(&mut self, progress: bool) -> &mut EasyBuilder
pub fn signal(&mut self, signal: bool) -> &mut EasyBuilder
pub fn wildcard_match(&mut self, m: bool) -> &mut EasyBuilder
pub fn fail_on_error(&mut self, fail: bool) -> &mut EasyBuilder
pub fn url(&mut self, url: &str) -> &mut EasyBuilder
pub fn port(&mut self, port: u16) -> &mut EasyBuilder
pub fn proxy(&mut self, url: &str) -> &mut EasyBuilder
pub fn proxy_port(&mut self, port: u16) -> &mut EasyBuilder
pub fn proxy_type(&mut self, kind: ProxyType) -> &mut EasyBuilder
pub fn noproxy(&mut self, skip: &str) -> &mut EasyBuilder
pub fn http_proxy_tunnel(&mut self, tunnel: bool) -> &mut EasyBuilder
pub fn interface(&mut self, interface: &str) -> &mut EasyBuilder
pub fn set_local_port(&mut self, port: u16) -> &mut EasyBuilder
pub fn local_port_range(&mut self, range: u16) -> &mut EasyBuilder
pub fn dns_cache_timeout(&mut self, dur: Duration) -> &mut EasyBuilder
pub fn buffer_size(&mut self, size: usize) -> &mut EasyBuilder
pub fn tcp_nodelay(&mut self, enable: bool) -> &mut EasyBuilder
pub fn address_scope(&mut self, scope: u32) -> &mut EasyBuilder
pub fn username(&mut self, user: &str) -> &mut EasyBuilder
pub fn password(&mut self, pass: &str) -> &mut EasyBuilder
pub fn proxy_username(&mut self, user: &str) -> &mut EasyBuilder
pub fn proxy_password(&mut self, pass: &str) -> &mut EasyBuilder
pub fn autoreferer(&mut self, enable: bool) -> &mut EasyBuilder
pub fn accept_encoding(&mut self, encoding: &str) -> &mut EasyBuilder
pub fn transfer_encoding(&mut self, enable: bool) -> &mut EasyBuilder
pub fn follow_location(&mut self, enable: bool) -> &mut EasyBuilder
pub fn unrestricted_auth(&mut self, enable: bool) -> &mut EasyBuilder
pub fn max_redirections(&mut self, max: u32) -> &mut EasyBuilder
pub fn put(&mut self, enable: bool) -> &mut EasyBuilder
pub fn post(&mut self, enable: bool) -> &mut EasyBuilder
pub fn post_fields_copy(&mut self, data: &[u8]) -> &mut EasyBuilder
pub fn post_field_size(&mut self, size: u64) -> &mut EasyBuilder
pub fn referer(&mut self, referer: &str) -> &mut EasyBuilder
pub fn useragent(&mut self, useragent: &str) -> &mut EasyBuilder
pub fn http_headers(&mut self, list: List) -> &mut EasyBuilder
pub fn get(&mut self, enable: bool) -> &mut EasyBuilder
pub fn ignore_content_length(&mut self, ignore: bool) -> &mut EasyBuilder
pub fn http_content_decoding(&mut self, enable: bool) -> &mut EasyBuilder
pub fn http_transfer_decoding(&mut self, enable: bool) -> &mut EasyBuilder
pub fn range(&mut self, range: &str) -> &mut EasyBuilder
pub fn resume_from(&mut self, from: u64) -> &mut EasyBuilder
pub fn custom_request(&mut self, request: &str) -> &mut EasyBuilder
pub fn fetch_filetime(&mut self, fetch: bool) -> &mut EasyBuilder
pub fn nobody(&mut self, enable: bool) -> &mut EasyBuilder
pub fn in_filesize(&mut self, size: u64) -> &mut EasyBuilder
pub fn upload(&mut self, enable: bool) -> &mut EasyBuilder
pub fn max_filesize(&mut self, size: u64) -> &mut EasyBuilder
pub fn time_condition(&mut self, cond: TimeCondition) -> &mut EasyBuilder
pub fn time_value(&mut self, val: i64) -> &mut EasyBuilder
pub fn timeout(&mut self, timeout: Duration) -> &mut EasyBuilder
pub fn low_speed_limit(&mut self, limit: u32) -> &mut EasyBuilder
pub fn low_speed_time(&mut self, dur: Duration) -> &mut EasyBuilder
pub fn max_send_speed(&mut self, speed: u64) -> &mut EasyBuilder
pub fn max_recv_speed(&mut self, speed: u64) -> &mut EasyBuilder
pub fn max_connects(&mut self, max: u32) -> &mut EasyBuilder
pub fn fresh_connect(&mut self, enable: bool) -> &mut EasyBuilder
pub fn forbid_reuse(&mut self, enable: bool) -> &mut EasyBuilder
pub fn connect_timeout(&mut self, timeout: Duration) -> &mut EasyBuilder
pub fn ip_resolve(&mut self, resolve: IpResolve) -> &mut EasyBuilder
pub fn connect_only(&mut self, enable: bool) -> &mut EasyBuilder
pub fn ssl_cert<P: AsRef<Path>>(&mut self, cert: P) -> &mut EasyBuilder
pub fn ssl_cert_type(&mut self, kind: &str) -> &mut EasyBuilder
pub fn ssl_key<P: AsRef<Path>>(&mut self, key: P) -> &mut EasyBuilder
pub fn ssl_key_type(&mut self, kind: &str) -> &mut EasyBuilder
pub fn key_password(&mut self, password: &str) -> &mut EasyBuilder
pub fn ssl_engine(&mut self, engine: &str) -> &mut EasyBuilder
pub fn ssl_engine_default(&mut self, enable: bool) -> &mut EasyBuilder
pub fn ssl_version(&mut self, version: SslVersion) -> &mut EasyBuilder
pub fn ssl_verify_host(&mut self, verify: bool) -> &mut EasyBuilder
pub fn ssl_verify_peer(&mut self, verify: bool) -> &mut EasyBuilder
pub fn cainfo<P: AsRef<Path>>(&mut self, path: P) -> &mut EasyBuilder
pub fn issuer_cert<P: AsRef<Path>>(&mut self, path: P) -> &mut EasyBuilder
pub fn capath<P: AsRef<Path>>(&mut self, path: P) -> &mut EasyBuilder
pub fn crlfile<P: AsRef<Path>>(&mut self, path: P) -> &mut EasyBuilder
pub fn certinfo(&mut self, enable: bool) -> &mut EasyBuilder
pub fn random_file<P: AsRef<Path>>(&mut self, p: P) -> &mut EasyBuilder
pub fn egd_socket<P: AsRef<Path>>(&mut self, p: P) -> &mut EasyBuilder
pub fn ssl_cipher_list(&mut self, ciphers: &str) -> &mut EasyBuilder
pub fn ssl_sessionid_cache(&mut self, enable: bool) -> &mut EasyBuilder
pub fn write_function<F>(&mut self, f: F) -> &mut EasyBuilder
pub fn read_function<F>(&mut self, f: F) -> &mut EasyBuilder
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Tests if the builder stores any curl::Error
happend during this build.
Sourcepub fn result(&mut self) -> BuildResult<&mut Easy>
pub fn result(&mut self) -> BuildResult<&mut Easy>
Finalize the builder and returns mutable reference of Easy
wrapped inside a Result
.
§Examples
use curl_easybuilder::EasyBuilder;
let mut b = EasyBuilder::new();
assert!(b.result().is_ok());
Auto Trait Implementations§
impl Freeze for EasyBuilder
impl !RefUnwindSafe for EasyBuilder
impl Send for EasyBuilder
impl !Sync for EasyBuilder
impl Unpin for EasyBuilder
impl !UnwindSafe for EasyBuilder
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