Trait gio::subclass::prelude::SocketControlMessageImpl

source ·
pub trait SocketControlMessageImpl: ObjectImpl + SocketControlMessageImplExt {
    // 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§

source

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

source

fn msg_type(&self) -> i32

source

fn size(&self) -> usize

Returns the space required for the control message, not including headers or alignment.

§Returns

The number of bytes required.

source

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.

source

fn deserialize( level: i32, type_: i32, data: &[u8], ) -> Option<SocketControlMessage>

Object Safety§

This trait is not object safe.

Implementors§