pub struct GetSockOpt { /* private fields */ }Expand description
Get a socket option, equivalent to getsockopt(2).
The value is written to optval, which has room for optlen bytes; on success the
completion’s result is the value’s length. The kernel only supports level SOL_SOCKET
(other levels fail with EOPNOTSUPP). Available since kernel 6.7.
Implementations§
Source§impl GetSockOpt
impl GetSockOpt
Sourcepub const CODE: u8
pub const CODE: u8
The opcode of the operation. This can be passed to
Probe::is_supported to check if this operation is
supported with the current kernel.
pub fn new( fd: impl UseFixed, level: u32, optname: u32, optval: *mut c_void, optlen: u32, ) -> Self
pub const fn flags(self, flags: u32) -> Self
pub fn build(self) -> Entry
Auto Trait Implementations§
impl !Send for GetSockOpt
impl !Sync for GetSockOpt
impl Forget for GetSockOpt
impl Freeze for GetSockOpt
impl RefUnwindSafe for GetSockOpt
impl Unpin for GetSockOpt
impl UnsafeUnpin for GetSockOpt
impl UnwindSafe for GetSockOpt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more