Struct curl::Version

pub struct Version { /* fields hidden */ }
Documentation

Version information about libcurl and the capabilities that it supports.

Implementations

impl Version
pub fn num() -> &'static str

Returns the libcurl version that this library is currently linked against.

pub fn get() -> Version

Returns the libcurl version that this library is currently linked against.

pub fn version(&Self) -> &str

Returns the human readable version string,

pub fn version_num(&Self) -> u32

Returns a numeric representation of the version number

This is a 24 bit number made up of the major number, minor, and then patch number. For example 7.9.8 will return 0x070908.

pub fn vendored(&Self) -> bool

Returns true if this was built with the vendored version of libcurl.

pub fn host(&Self) -> &str

Returns a human readable string of the host libcurl is built for.

This is discovered as part of the build environment.

pub fn feature_ipv6(&Self) -> bool

Returns whether libcurl supports IPv6

pub fn feature_ssl(&Self) -> bool

Returns whether libcurl supports SSL

pub fn feature_libz(&Self) -> bool

Returns whether libcurl supports HTTP deflate via libz

pub fn feature_ntlm(&Self) -> bool

Returns whether libcurl supports HTTP NTLM

pub fn feature_gss_negotiate(&Self) -> bool

Returns whether libcurl supports HTTP GSSNEGOTIATE

pub fn feature_debug(&Self) -> bool

Returns whether libcurl was built with debug capabilities

pub fn feature_spnego(&Self) -> bool

Returns whether libcurl was built with SPNEGO authentication

pub fn feature_largefile(&Self) -> bool

Returns whether libcurl was built with large file support

pub fn feature_idn(&Self) -> bool

Returns whether libcurl was built with support for IDNA, domain names with international letters.

pub fn feature_sspi(&Self) -> bool

Returns whether libcurl was built with support for SSPI.

pub fn feature_async_dns(&Self) -> bool

Returns whether libcurl was built with asynchronous name lookups.

pub fn feature_conv(&Self) -> bool

Returns whether libcurl was built with support for character conversions.

pub fn feature_tlsauth_srp(&Self) -> bool

Returns whether libcurl was built with support for TLS-SRP.

pub fn feature_ntlm_wb(&Self) -> bool

Returns whether libcurl was built with support for NTLM delegation to winbind helper.

pub fn feature_unix_domain_socket(&Self) -> bool

Returns whether libcurl was built with support for unix domain socket

pub fn feature_http2(&Self) -> bool

Returns whether libcurl was built with support for HTTP2.

pub fn feature_http3(&Self) -> bool

Returns whether libcurl was built with support for HTTP3.

pub fn feature_brotli(&Self) -> bool

Returns whether libcurl was built with support for Brotli.

pub fn feature_altsvc(&Self) -> bool

Returns whether libcurl was built with support for Alt-Svc.

pub fn feature_zstd(&Self) -> bool

Returns whether libcurl was built with support for zstd

pub fn feature_unicode(&Self) -> bool

Returns whether libcurl was built with support for unicode

pub fn feature_hsts(&Self) -> bool

Returns whether libcurl was built with support for hsts

pub fn feature_gsasl(&Self) -> bool

Returns whether libcurl was built with support for gsasl

pub fn ssl_version(&Self) -> Option<&str>

Returns the version of OpenSSL that is used, or None if there is no SSL support.

pub fn libz_version(&Self) -> Option<&str>

Returns the version of libz that is used, or None if there is no libz support.

pub fn protocols(&Self) -> Protocols<'_>

Returns an iterator over the list of protocols that this build of libcurl supports.

pub fn ares_version(&Self) -> Option<&str>

If available, the human readable version of ares that libcurl is linked against.

pub fn ares_version_num(&Self) -> Option<u32>

If available, the version of ares that libcurl is linked against.

pub fn libidn_version(&Self) -> Option<&str>

If available, the version of libidn that libcurl is linked against.

pub fn iconv_version_num(&Self) -> Option<u32>

If available, the version of iconv libcurl is linked against.

pub fn libssh_version(&Self) -> Option<&str>

If available, the version of libssh that libcurl is linked against.

pub fn brotli_version_num(&Self) -> Option<u32>

If available, the version of brotli libcurl is linked against.

pub fn brotli_version(&Self) -> Option<&str>

If available, the version of brotli libcurl is linked against.

pub fn nghttp2_version_num(&Self) -> Option<u32>

If available, the version of nghttp2 libcurl is linked against.

pub fn nghttp2_version(&Self) -> Option<&str>

If available, the version of nghttp2 libcurl is linked against.

pub fn quic_version(&Self) -> Option<&str>

If available, the version of quic libcurl is linked against.

pub fn cainfo(&Self) -> Option<&str>

If available, the built-in default of CURLOPT_CAINFO.

pub fn capath(&Self) -> Option<&str>

If available, the built-in default of CURLOPT_CAPATH.

pub fn zstd_ver_num(&Self) -> Option<u32>

If avaiable, the numeric zstd version

Represented as (MAJOR << 24) | (MINOR << 12) | PATCH

pub fn zstd_version(&Self) -> Option<&str>

If available, the human readable version of zstd

pub fn hyper_version(&Self) -> Option<&str>

If available, the human readable version of hyper

pub fn gsasl_version(&Self) -> Option<&str>

If available, the human readable version of hyper

Trait Implementations

impl Debug for Version
fn fmt(&Self, f: &mut fmt::Formatter<'_>) -> fmt::Result

Auto Trait Implementations

impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version

Blanket Implementations

impl<T> Any for T
where
    T: 'static + ?Sized,
fn type_id(&Self) -> TypeId
impl<T> Borrow<T> for T
where
    T: ?Sized,
fn borrow(&Self) -> &T
impl<T> BorrowMut<T> for T
where
    T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T
impl<T> From<T> for T
fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for T
where
    U: From<T>,
fn into(Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

impl<T, U> TryFrom<U> for T
where
    U: Into<T>,
type Error = Infallible
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for T
where
    U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn try_into(Self) -> Result<U, <U as TryFrom<T>>::Error>