#[repr(C)]
pub struct _sapi_module_struct {
Show 36 fields pub name: *mut c_char, pub pretty_name: *mut c_char, pub startup: Option<unsafe extern "C" fn(sapi_module: *mut _sapi_module_struct) -> c_int>, pub shutdown: Option<unsafe extern "C" fn(sapi_module: *mut _sapi_module_struct) -> c_int>, pub activate: Option<unsafe extern "C" fn() -> c_int>, pub deactivate: Option<unsafe extern "C" fn() -> c_int>, pub ub_write: Option<unsafe extern "C" fn(str_: *const c_char, str_length: usize) -> usize>, pub flush: Option<unsafe extern "C" fn(server_context: *mut c_void)>, pub get_stat: Option<unsafe extern "C" fn() -> *mut zend_stat_t>, pub getenv: Option<unsafe extern "C" fn(name: *const c_char, name_len: usize) -> *mut c_char>, pub sapi_error: Option<unsafe extern "C" fn(type_: c_int, error_msg: *const c_char, ...)>, pub header_handler: Option<unsafe extern "C" fn(sapi_header: *mut sapi_header_struct, op: sapi_header_op_enum, sapi_headers: *mut sapi_headers_struct) -> c_int>, pub send_headers: Option<unsafe extern "C" fn(sapi_headers: *mut sapi_headers_struct) -> c_int>, pub send_header: Option<unsafe extern "C" fn(sapi_header: *mut sapi_header_struct, server_context: *mut c_void)>, pub read_post: Option<unsafe extern "C" fn(buffer: *mut c_char, count_bytes: usize) -> usize>, pub read_cookies: Option<unsafe extern "C" fn() -> *mut c_char>, pub register_server_variables: Option<unsafe extern "C" fn(track_vars_array: *mut zval)>, pub log_message: Option<unsafe extern "C" fn(message: *const c_char, syslog_type_int: c_int)>, pub get_request_time: Option<unsafe extern "C" fn(request_time: *mut f64) -> zend_result>, pub terminate_process: Option<unsafe extern "C" fn()>, pub php_ini_path_override: *mut c_char, pub default_post_reader: Option<unsafe extern "C" fn()>, pub treat_data: Option<unsafe extern "C" fn(arg: c_int, str_: *mut c_char, destArray: *mut zval)>, pub executable_location: *mut c_char, pub php_ini_ignore: c_int, pub php_ini_ignore_cwd: c_int, pub get_fd: Option<unsafe extern "C" fn(fd: *mut c_int) -> c_int>, pub force_http_10: Option<unsafe extern "C" fn() -> c_int>, pub get_target_uid: Option<unsafe extern "C" fn(arg1: *mut uid_t) -> c_int>, pub get_target_gid: Option<unsafe extern "C" fn(arg1: *mut gid_t) -> c_int>, pub input_filter: Option<unsafe extern "C" fn(arg: c_int, var: *const c_char, val: *mut *mut c_char, val_len: usize, new_val_len: *mut usize) -> c_uint>, pub ini_defaults: Option<unsafe extern "C" fn(configuration_hash: *mut HashTable)>, pub phpinfo_as_text: c_int, pub ini_entries: *const c_char, pub additional_functions: *const zend_function_entry, pub input_filter_init: Option<unsafe extern "C" fn() -> c_uint>,
}

Fields§

§name: *mut c_char§pretty_name: *mut c_char§startup: Option<unsafe extern "C" fn(sapi_module: *mut _sapi_module_struct) -> c_int>§shutdown: Option<unsafe extern "C" fn(sapi_module: *mut _sapi_module_struct) -> c_int>§activate: Option<unsafe extern "C" fn() -> c_int>§deactivate: Option<unsafe extern "C" fn() -> c_int>§ub_write: Option<unsafe extern "C" fn(str_: *const c_char, str_length: usize) -> usize>§flush: Option<unsafe extern "C" fn(server_context: *mut c_void)>§get_stat: Option<unsafe extern "C" fn() -> *mut zend_stat_t>§getenv: Option<unsafe extern "C" fn(name: *const c_char, name_len: usize) -> *mut c_char>§sapi_error: Option<unsafe extern "C" fn(type_: c_int, error_msg: *const c_char, ...)>§header_handler: Option<unsafe extern "C" fn(sapi_header: *mut sapi_header_struct, op: sapi_header_op_enum, sapi_headers: *mut sapi_headers_struct) -> c_int>§send_headers: Option<unsafe extern "C" fn(sapi_headers: *mut sapi_headers_struct) -> c_int>§send_header: Option<unsafe extern "C" fn(sapi_header: *mut sapi_header_struct, server_context: *mut c_void)>§read_post: Option<unsafe extern "C" fn(buffer: *mut c_char, count_bytes: usize) -> usize>§read_cookies: Option<unsafe extern "C" fn() -> *mut c_char>§register_server_variables: Option<unsafe extern "C" fn(track_vars_array: *mut zval)>§log_message: Option<unsafe extern "C" fn(message: *const c_char, syslog_type_int: c_int)>§get_request_time: Option<unsafe extern "C" fn(request_time: *mut f64) -> zend_result>§terminate_process: Option<unsafe extern "C" fn()>§php_ini_path_override: *mut c_char§default_post_reader: Option<unsafe extern "C" fn()>§treat_data: Option<unsafe extern "C" fn(arg: c_int, str_: *mut c_char, destArray: *mut zval)>§executable_location: *mut c_char§php_ini_ignore: c_int§php_ini_ignore_cwd: c_int§get_fd: Option<unsafe extern "C" fn(fd: *mut c_int) -> c_int>§force_http_10: Option<unsafe extern "C" fn() -> c_int>§get_target_uid: Option<unsafe extern "C" fn(arg1: *mut uid_t) -> c_int>§get_target_gid: Option<unsafe extern "C" fn(arg1: *mut gid_t) -> c_int>§input_filter: Option<unsafe extern "C" fn(arg: c_int, var: *const c_char, val: *mut *mut c_char, val_len: usize, new_val_len: *mut usize) -> c_uint>§ini_defaults: Option<unsafe extern "C" fn(configuration_hash: *mut HashTable)>§phpinfo_as_text: c_int§ini_entries: *const c_char§additional_functions: *const zend_function_entry§input_filter_init: Option<unsafe extern "C" fn() -> c_uint>

Implementations§

source§

impl _sapi_module_struct

source

pub fn get() -> GlobalReadGuard<Self>

Returns a reference to the PHP SAPI module.

The executor globals are guarded by a RwLock. There can be multiple immutable references at one time but only ever one mutable reference. Attempting to retrieve the globals while already holding the global guard will lead to a deadlock. Dropping the globals guard will release the lock.

source

pub fn get_mut() -> GlobalWriteGuard<Self>

Returns a mutable reference to the PHP executor globals.

The executor globals are guarded by a RwLock. There can be multiple immutable references at one time but only ever one mutable reference. Attempting to retrieve the globals while already holding the global guard will lead to a deadlock. Dropping the globals guard will release the lock.

Trait Implementations§

source§

impl Clone for _sapi_module_struct

source§

fn clone(&self) -> _sapi_module_struct

Returns a copy 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 _sapi_module_struct

source§

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

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

impl Copy for _sapi_module_struct

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, 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,

§

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>,

§

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>,

§

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.