/// The windows `sockaddr_in6` type is a union with accessor functions which /// are not `const fn`. Define our own layout-compatible version so that we /// can transmute in and out of it. #[cfg(windows)] #[repr(C)] struct sockaddr_in6 {
sin6_family: u16,
sin6_port: u16,
sin6_flowinfo: u32,
sin6_addr: c::in6_addr,
sin6_scope_id: u32,
}
#[cfg(windows)] #[inline] pub(crate) constfn in_addr_s_addr(addr: c::in_addr) -> u32 { // This should be `*addr.S_un.S_addr()`, except that isn't a `const fn`. unsafe { core::mem::transmute(addr) }
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.