pub trait SocketControlMessageImpl: ObjectImpl + ObjectSubclass<Type: IsA<SocketControlMessage>> {
// Provided methods
fn level(&self) -> i32 { ... }
fn msg_type(&self) -> i32 { ... }
fn size(&self) -> usize { ... }
fn serialize(&self, data: &mut [u8]) { ... }
fn deserialize(
level: i32,
type_: i32,
data: &[u8],
) -> Option<SocketControlMessage> { ... }
}
Provided Methods§
Sourcefn level(&self) -> i32
fn level(&self) -> i32
Returns the “level” (i.e. the originating protocol) of the control message. This is often SOL_SOCKET.
§Returns
an integer describing the level
fn msg_type(&self) -> i32
Sourcefn size(&self) -> usize
fn size(&self) -> usize
Returns the space required for the control message, not including headers or alignment.
§Returns
The number of bytes required.
Sourcefn serialize(&self, data: &mut [u8])
fn serialize(&self, data: &mut [u8])
Converts the data in the message to bytes placed in the message.
@data is guaranteed to have enough space to fit the size returned by g_socket_control_message_get_size() on this object.
fn deserialize( level: i32, type_: i32, data: &[u8], ) -> Option<SocketControlMessage>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.