Skip to main content

CurlApi

Struct CurlApi 

Source
pub struct CurlApi {
Show 24 fields pub global_init: unsafe extern "C" fn(c_ulong) -> CurlCode, pub global_cleanup: unsafe extern "C" fn(), pub easy_init: unsafe extern "C" fn() -> *mut Curl, pub easy_cleanup: unsafe extern "C" fn(*mut Curl), pub easy_perform: unsafe extern "C" fn(*mut Curl) -> CurlCode, pub easy_setopt: unsafe extern "C" fn(*mut Curl, CurlOption, ...) -> CurlCode, pub easy_strerror: unsafe extern "C" fn(CurlCode) -> *const c_char, pub easy_impersonate: unsafe extern "C" fn(*mut Curl, *const c_char, c_int) -> CurlCode, pub slist_append: unsafe extern "C" fn(*mut CurlSlist, *const c_char) -> *mut CurlSlist, pub slist_free_all: unsafe extern "C" fn(*mut CurlSlist), pub ws_send: unsafe extern "C" fn(*mut Curl, *const c_void, usize, *mut usize, i64, c_uint) -> CurlCode, pub ws_recv: unsafe extern "C" fn(*mut Curl, *mut c_void, usize, *mut usize, *mut *const CurlWsFrame) -> CurlCode, pub multi_init: unsafe extern "C" fn() -> *mut CurlMulti, pub multi_cleanup: unsafe extern "C" fn(*mut CurlMulti) -> CurlMCode, pub multi_setopt: unsafe extern "C" fn(*mut CurlMulti, CurlMOption, ...) -> CurlMCode, pub multi_add_handle: unsafe extern "C" fn(*mut CurlMulti, *mut Curl) -> CurlMCode, pub multi_remove_handle: unsafe extern "C" fn(*mut CurlMulti, *mut Curl) -> CurlMCode, pub multi_fdset: unsafe extern "C" fn(*mut CurlMulti, *mut c_void, *mut c_void, *mut c_void, *mut c_int) -> CurlMCode, pub multi_timeout: unsafe extern "C" fn(*mut CurlMulti, *mut c_long) -> CurlMCode, pub multi_perform: unsafe extern "C" fn(*mut CurlMulti, *mut c_int) -> CurlMCode, pub multi_poll: unsafe extern "C" fn(*mut CurlMulti, *mut CurlWaitFd, c_uint, c_int, *mut c_int) -> CurlMCode, pub multi_socket_action: unsafe extern "C" fn(*mut CurlMulti, CurlSocket, c_int, *mut c_int) -> CurlMCode, pub multi_info_read: unsafe extern "C" fn(*mut CurlMulti, *mut c_int) -> *mut CurlMessage, pub multi_strerror: unsafe extern "C" fn(CurlMCode) -> *const c_char, /* private fields */
}

Fields§

§global_init: unsafe extern "C" fn(c_ulong) -> CurlCode§global_cleanup: unsafe extern "C" fn()§easy_init: unsafe extern "C" fn() -> *mut Curl§easy_cleanup: unsafe extern "C" fn(*mut Curl)§easy_perform: unsafe extern "C" fn(*mut Curl) -> CurlCode§easy_setopt: unsafe extern "C" fn(*mut Curl, CurlOption, ...) -> CurlCode§easy_strerror: unsafe extern "C" fn(CurlCode) -> *const c_char§easy_impersonate: unsafe extern "C" fn(*mut Curl, *const c_char, c_int) -> CurlCode§slist_append: unsafe extern "C" fn(*mut CurlSlist, *const c_char) -> *mut CurlSlist§slist_free_all: unsafe extern "C" fn(*mut CurlSlist)§ws_send: unsafe extern "C" fn(*mut Curl, *const c_void, usize, *mut usize, i64, c_uint) -> CurlCode§ws_recv: unsafe extern "C" fn(*mut Curl, *mut c_void, usize, *mut usize, *mut *const CurlWsFrame) -> CurlCode§multi_init: unsafe extern "C" fn() -> *mut CurlMulti§multi_cleanup: unsafe extern "C" fn(*mut CurlMulti) -> CurlMCode§multi_setopt: unsafe extern "C" fn(*mut CurlMulti, CurlMOption, ...) -> CurlMCode§multi_add_handle: unsafe extern "C" fn(*mut CurlMulti, *mut Curl) -> CurlMCode§multi_remove_handle: unsafe extern "C" fn(*mut CurlMulti, *mut Curl) -> CurlMCode§multi_fdset: unsafe extern "C" fn(*mut CurlMulti, *mut c_void, *mut c_void, *mut c_void, *mut c_int) -> CurlMCode§multi_timeout: unsafe extern "C" fn(*mut CurlMulti, *mut c_long) -> CurlMCode§multi_perform: unsafe extern "C" fn(*mut CurlMulti, *mut c_int) -> CurlMCode§multi_poll: unsafe extern "C" fn(*mut CurlMulti, *mut CurlWaitFd, c_uint, c_int, *mut c_int) -> CurlMCode§multi_socket_action: unsafe extern "C" fn(*mut CurlMulti, CurlSocket, c_int, *mut c_int) -> CurlMCode§multi_info_read: unsafe extern "C" fn(*mut CurlMulti, *mut c_int) -> *mut CurlMessage§multi_strerror: unsafe extern "C" fn(CurlMCode) -> *const c_char

Implementations§

Source§

impl CurlApi

Source

pub unsafe fn load(path: &Path) -> Result<Self, SysError>

§Safety

Caller must ensure the loaded library is ABI-compatible with the symbols used.

Source

pub fn error_text(&self, code: CurlCode) -> String

Source

pub fn multi_error_text(&self, code: CurlMCode) -> String

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more