pub fn new(addr: A, zone: Option<Z>) -> Option<Self> {
        match zone {
            Some(zone) => AddrAndZone::new(addr, zone).map(ZonedAddress::Zoned),
            None => SpecifiedAddr::new(addr).map(ZonedAddress::Unzoned),
        }
    }
/// Creates a new `ZonedAddress` with the provided optional scope zone.
///
/// If `zone` is `None`, [`ZonedAddress::Unzoned`] is returned. Otherwise, a
/// [`ZonedAddress::Zoned`] is returned only if the provided `addr`'s scope
/// can have a zone (`addr.scope().can_have_zone()`).
Creates a new `ZonedAddress` with the provided optional scope zone.
Creates a new ` ZonedAddress ` with the provided optional scope zone .
pub fn new(addr: A, zone: Option<Z>) -> Option<Self> {
        match zone {
            Some(zone) => AddrAndZone::new(addr, zone).map(ZonedAddress::Zoned),
            None => SpecifiedAddr::new(addr).map(ZonedAddress::Unzoned),
        }
    }
pub fn new ( addr : A , zone : Option < Z > ) -> Option < Self > { match zone { Some ( zone ) => AddrAndZone :: new ( addr , zone ) . map ( ZonedAddress :: Zoned ) , None => SpecifiedAddr :: new ( addr ) . map ( ZonedAddress :: Unzoned ) , } }
Creates a new `ZonedAddress` with the provided optional scope zone.
Creates a new ` ZonedAddress ` with the provided optional scope zone .
addr
A
zone
Option<Z>
addr
A
zone
Option<Z>