Tracking Issue for const_sockaddr_setters
· Issue #131714 · rust-lang/rust (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
Feature gate: #![feature(const_sockaddr_setters)]
This is a tracking issue using the set_ip
and set_port
methods on SocketAddr
types in const
contexts.
Public API
// core::net
impl SocketAddr { pub const fn set_ip(&mut self, new_ip: IpAddr); pub const fn set_port(&mut self, new_port: u16); }
impl SocketAddrV4 { pub const fn set_ip(&mut self, new_ip: Ipv4Addr); pub const fn set_port(&mut self, new_port: u16); }
impl SocketAddrV6 { pub const fn set_ip(&mut self, new_ip: Ipv6Addr); pub const fn set_port(&mut self, new_port: u16); pub const fn set_flowinfo(&mut self, new_flowinfo: u32); pub const fn set_scope_id(&mut self, new_scope_id: u32); }
Steps / History
- Implementation: Add an unstable const_sockaddr_setters feature #131715
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.