Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/cidr/direct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ macro_rules! impl_cidr_for {
self.address
}

/// the reference about first address in the network as plain address
pub const fn first_address_ref(&self) -> &$addr {
&self.address
}

/// first address in the network
pub const fn first(&self) -> $inet {
$inet {
Expand Down
5 changes: 5 additions & 0 deletions src/inet/direct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ macro_rules! impl_inet_for {
self.address
}

/// the reference about host
pub const fn address_ref(&self) -> &$addr {
&self.address
}

/// first address in the network as plain address
pub const fn first_address(&self) -> $addr {
<$addr as PrivUnspecAddress>::_Tools::_network_address(
Expand Down
Loading