pub unsafe trait GetSockOpt<'a> {
type OptVal;
type Result
where Self: 'a;
// Required methods
fn prepare_getsockopt_args(&self) -> (int, int);
fn prepare_getsockopt_result(
&self,
retval: int,
optval: Self::OptVal,
) -> Self::Result;
}Expand description
Implemented by options that can be used with getsockopt.
Safety: Implementers must ensure that they only generate valid combinations
of getsockopt level, optname, optval, and optlen.
Required Associated Types§
Required Methods§
Sourcefn prepare_getsockopt_args(&self) -> (int, int)
fn prepare_getsockopt_args(&self) -> (int, int)
Prepare the arguments for a getsockopt system call. The tuple
elements of the result are (level, optname, optlen).
Sourcefn prepare_getsockopt_result(
&self,
retval: int,
optval: Self::OptVal,
) -> Self::Result
fn prepare_getsockopt_result( &self, retval: int, optval: Self::OptVal, ) -> Self::Result
Prepare a raw successful result from a getsockopt call to be returned.