Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an unstable const_sockaddr_setters feature #131715

Merged
merged 1 commit into from
Oct 27, 2024

Commits on Oct 14, 2024

  1. Add a const_sockaddr_setters feature

    Unstably add `const` to the `sockaddr_setters` methods. Included 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);
        }
    
    Tracking issue: <rust-lang#131714>
    tgross35 committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    d6146a8 View commit details
    Browse the repository at this point in the history