Struct machinery_api::foundation::OsSocketApi[][src]

#[repr(C)]
pub struct OsSocketApi {
Show 17 fields pub init: Option<unsafe extern "C" fn()>, pub shutdown: Option<unsafe extern "C" fn()>, pub socket: Option<unsafe extern "C" fn(type_: OsSocketType) -> SocketO>, pub set_option: Option<unsafe extern "C" fn(socket: SocketO, option: OsSocketOption, enabled: bool)>, pub bind: Option<unsafe extern "C" fn(socket: SocketO, address: SocketAddressT) -> bool>, pub getsockname: Option<unsafe extern "C" fn(socket: SocketO, address: *mut SocketAddressT) -> bool>, pub listen: Option<unsafe extern "C" fn(socket: SocketO, queue_size: u32) -> bool>, pub accept: Option<unsafe extern "C" fn(socket: SocketO, address: *mut SocketAddressT) -> SocketO>, pub connect: Option<unsafe extern "C" fn(socket: SocketO, target: SocketAddressT) -> OsSocketConnect>, pub send: Option<unsafe extern "C" fn(socket: SocketO, buffer: *const c_void, size: u32) -> i32>, pub recv: Option<unsafe extern "C" fn(socket: SocketO, buffer: *mut c_void, size: u32) -> i32>, pub sendto: Option<unsafe extern "C" fn(socket: SocketO, buffer: *const c_void, size: u32, target: SocketAddressT) -> i32>, pub recvfrom: Option<unsafe extern "C" fn(socket: SocketO, buffer: *mut c_void, size: u32, source: *mut SocketAddressT) -> i32>, pub close: Option<unsafe extern "C" fn(socket: SocketO) -> bool>, pub getaddrinfo: Option<unsafe extern "C" fn(name: *const c_char, service: *const c_char, addresses: *mut SocketAddressT, size: u32) -> u32>, pub getaddrinfo_async: Option<unsafe extern "C" fn(name: *const c_char, service: *const c_char) -> *mut c_void>, pub getaddrinfo_result: Option<unsafe extern "C" fn(query: *mut c_void, addresses: *mut SocketAddressT, count: *mut u32) -> OsSocketGetaddrinfo>,
}

Fields

init: Option<unsafe extern "C" fn()>shutdown: Option<unsafe extern "C" fn()>socket: Option<unsafe extern "C" fn(type_: OsSocketType) -> SocketO>set_option: Option<unsafe extern "C" fn(socket: SocketO, option: OsSocketOption, enabled: bool)>bind: Option<unsafe extern "C" fn(socket: SocketO, address: SocketAddressT) -> bool>getsockname: Option<unsafe extern "C" fn(socket: SocketO, address: *mut SocketAddressT) -> bool>listen: Option<unsafe extern "C" fn(socket: SocketO, queue_size: u32) -> bool>accept: Option<unsafe extern "C" fn(socket: SocketO, address: *mut SocketAddressT) -> SocketO>connect: Option<unsafe extern "C" fn(socket: SocketO, target: SocketAddressT) -> OsSocketConnect>send: Option<unsafe extern "C" fn(socket: SocketO, buffer: *const c_void, size: u32) -> i32>recv: Option<unsafe extern "C" fn(socket: SocketO, buffer: *mut c_void, size: u32) -> i32>sendto: Option<unsafe extern "C" fn(socket: SocketO, buffer: *const c_void, size: u32, target: SocketAddressT) -> i32>recvfrom: Option<unsafe extern "C" fn(socket: SocketO, buffer: *mut c_void, size: u32, source: *mut SocketAddressT) -> i32>close: Option<unsafe extern "C" fn(socket: SocketO) -> bool>getaddrinfo: Option<unsafe extern "C" fn(name: *const c_char, service: *const c_char, addresses: *mut SocketAddressT, size: u32) -> u32>getaddrinfo_async: Option<unsafe extern "C" fn(name: *const c_char, service: *const c_char) -> *mut c_void>getaddrinfo_result: Option<unsafe extern "C" fn(query: *mut c_void, addresses: *mut SocketAddressT, count: *mut u32) -> OsSocketGetaddrinfo>

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.