File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -63,23 +63,23 @@ impl SockAddr {
63
63
}
64
64
65
65
/// Returns this address's family.
66
- pub fn family ( & self ) -> sa_family_t {
66
+ pub const fn family ( & self ) -> sa_family_t {
67
67
self . storage . ss_family
68
68
}
69
69
70
70
/// Returns the size of this address in bytes.
71
- pub fn len ( & self ) -> socklen_t {
71
+ pub const fn len ( & self ) -> socklen_t {
72
72
self . len
73
73
}
74
74
75
75
/// Returns a raw pointer to the address.
76
- pub fn as_ptr ( & self ) -> * const sockaddr {
76
+ pub const fn as_ptr ( & self ) -> * const sockaddr {
77
77
& self . storage as * const _ as * const _
78
78
}
79
79
80
80
/// Returns a raw pointer to the address storage.
81
81
#[ cfg( unix) ]
82
- pub ( crate ) fn as_storage_ptr ( & self ) -> * const sockaddr_storage {
82
+ pub ( crate ) const fn as_storage_ptr ( & self ) -> * const sockaddr_storage {
83
83
& self . storage
84
84
}
85
85
You can’t perform that action at this time.
0 commit comments