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