fn read_ip_literal(&mut self) -> Result<Option<HostData>> {
        if !self.read_str("[") {
            return Ok(None);
        }

        let host = if let Some(addr) = self.scan_v6() {
            self.out.tag = Tag::HOST_IPV6;
            HostData {
                ipv6: Ipv6Data {
                    addr,
                    #[cfg(feature = "rfc6874bis")]
                    zone_id_start: self.read_zone_id()?,
                },
            }
        } else {
            #[cfg(feature = "ipv_future")]
            if self.marked_len() == 1 {
                self.read_ipv_future()?
            } else {
                err!(self.mark, InvalidIpLiteral);
            }
            #[cfg(not(feature = "ipv_future"))]
            err!(self.mark, InvalidIpLiteral);
        };

        if !self.read_str("]") {
            err!(self.mark, InvalidIpLiteral);
        }
        Ok(Some(host))
    }
// The marked length must be zero when this function is called.
The marked length must be zero when this function is called.
The marked length must be zero when this function is called .
fn read_ip_literal(&mut self) -> Result<Option<HostData>> {
        if !self.read_str("[") {
            return Ok(None);
        }
        let host = if let Some(addr) = self.scan_v6() {
            self.out.tag = Tag::HOST_IPV6;
            HostData {
                ipv6: Ipv6Data {
                    addr,
                    #[cfg(feature = "rfc6874bis")]
                    zone_id_start: self.read_zone_id()?,
                },
            }
        } else {
            #[cfg(feature = "ipv_future")]
            if self.marked_len() == 1 {
                self.read_ipv_future()?
            } else {
                err!(self.mark, InvalidIpLiteral);
            }
            #[cfg(not(feature = "ipv_future"))]
            err!(self.mark, InvalidIpLiteral);
        };
        if !self.read_str("]") {
            err!(self.mark, InvalidIpLiteral);
        }
        Ok(Some(host))
    }
fn read_ip_literal ( & mut self ) -> Result < Option < HostData > > { if ! self . read_str ( " " ) { return Ok ( None ) ; } let host = if let Some ( addr ) = self . scan_v6 ( ) { self . out . tag = Tag :: HOST_IPV6 ; HostData { ipv6 : Ipv6Data { addr , # [ cfg ( feature " " ) ] zone_id_start : self . read_zone_id ( ) ? , } , } } else { # [ cfg ( feature " " ) ] if self . marked_len ( ) == 1 { self . read_ipv_future ( ) ? } else { err ! ( self mark InvalidIpLiteral ) ; } # [ cfg ( not ( feature " " ) ) ] err ! ( self mark InvalidIpLiteral ) ; } ; if ! self . read_str ( " " ) { err ! ( self mark InvalidIpLiteral ) ; } Ok ( Some ( host ) ) }
The marked length must be zero when this function is called.
The marked length must be zero when this function is called .
&mut self
&mut self