from static method

ParseOutcome<CidrFailure, Cidr> from({
  1. required IpAddress network,
  2. required int prefixLength,
})

The block at network covering prefixLength bits, reporting the CidrFailure when the prefix does not fit the family or network has bits set below it.

Implementation

static ParseOutcome<CidrFailure, Cidr> from({
  required IpAddress network,
  required int prefixLength,
}) => parse('${network.value}$_prefixSeparator$prefixLength');