_cef_urlrequest_client_t

Struct _cef_urlrequest_client_t 

Source
#[repr(C)]
pub struct _cef_urlrequest_client_t { pub base: cef_base_ref_counted_t, pub on_request_complete: Option<unsafe extern "C" fn(self_: *mut _cef_urlrequest_client_t, request: *mut _cef_urlrequest_t)>, pub on_upload_progress: Option<unsafe extern "C" fn(self_: *mut _cef_urlrequest_client_t, request: *mut _cef_urlrequest_t, current: i64, total: i64)>, pub on_download_progress: Option<unsafe extern "C" fn(self_: *mut _cef_urlrequest_client_t, request: *mut _cef_urlrequest_t, current: i64, total: i64)>, pub on_download_data: Option<unsafe extern "C" fn(self_: *mut _cef_urlrequest_client_t, request: *mut _cef_urlrequest_t, data: *const c_void, data_length: usize)>, pub get_auth_credentials: Option<unsafe extern "C" fn(self_: *mut _cef_urlrequest_client_t, isProxy: c_int, host: *const cef_string_t, port: c_int, realm: *const cef_string_t, scheme: *const cef_string_t, callback: *mut _cef_auth_callback_t) -> c_int>, }
Expand description

Structure that should be implemented by the cef_urlrequest_t client. The functions of this structure will be called on the same thread that created the request unless otherwise documented.

NOTE: This struct is allocated client-side.

Fields§

§base: cef_base_ref_counted_t

Base structure.

§on_request_complete: Option<unsafe extern "C" fn(self_: *mut _cef_urlrequest_client_t, request: *mut _cef_urlrequest_t)>

Notifies the client that the request has completed. Use the cef_urlrequest_t::GetRequestStatus function to determine if the request was successful or not.

§on_upload_progress: Option<unsafe extern "C" fn(self_: *mut _cef_urlrequest_client_t, request: *mut _cef_urlrequest_t, current: i64, total: i64)>

Notifies the client of upload progress. |current| denotes the number of bytes sent so far and |total| is the total size of uploading data (or -1 if chunked upload is enabled). This function will only be called if the UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.

§on_download_progress: Option<unsafe extern "C" fn(self_: *mut _cef_urlrequest_client_t, request: *mut _cef_urlrequest_t, current: i64, total: i64)>

Notifies the client of download progress. |current| denotes the number of bytes received up to the call and |total| is the expected total size of the response (or -1 if not determined).

§on_download_data: Option<unsafe extern "C" fn(self_: *mut _cef_urlrequest_client_t, request: *mut _cef_urlrequest_t, data: *const c_void, data_length: usize)>

Called when some part of the response is read. |data| contains the current bytes received since the last call. This function will not be called if the UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.

§get_auth_credentials: Option<unsafe extern "C" fn(self_: *mut _cef_urlrequest_client_t, isProxy: c_int, host: *const cef_string_t, port: c_int, realm: *const cef_string_t, scheme: *const cef_string_t, callback: *mut _cef_auth_callback_t) -> c_int>

Called on the IO thread when the browser needs credentials from the user. |isProxy| indicates whether the host is a proxy server. |host| contains the hostname and |port| contains the port number. Return true (1) to continue the request and call cef_auth_callback_t::cont() when the authentication information is available. If the request has an associated browser/frame then returning false (0) will result in a call to GetAuthCredentials on the cef_request_handler_t associated with that browser, if any. Otherwise, returning false (0) will cancel the request immediately. This function will only be called for requests initiated from the browser process.

Trait Implementations§

Source§

impl Clone for _cef_urlrequest_client_t

Source§

fn clone(&self) -> _cef_urlrequest_client_t

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for _cef_urlrequest_client_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for _cef_urlrequest_client_t

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.