Lines Matching refs:new

25     fn new(data: &'a str) -> Parser<'a> {  in new()  method
382 Parser::new(s).until_eof(|p| p.accept_mac()) in from_str()
392 Parser::new(s).until_eof(|p| p.accept_ipv4()) in from_str()
402 Parser::new(s).until_eof(|p| p.accept_ipv6()) in from_str()
411 Parser::new(s).until_eof(|p| p.accept_ip()) in from_str()
421 Parser::new(s).until_eof(|p| { in from_str()
425 Ok(Ipv4Cidr::new(ip, prefix_len)) in from_str()
437 Parser::new(s).until_eof(|p| { in from_str()
441 Ok(Ipv6Cidr::new(ip, prefix_len)) in from_str()
473 Parser::new(s).until_eof(|p| p.accept_ip_endpoint()) in from_str()
556 Ok(Ipv6Address::new(0xfe80, 0, 0, 0, 0, 0, 0, 1)) in test_ipv6()
562 Ok(Ipv6Address::new(0xfe80, 0, 0, 0, 0, 0, 0, 1)) in test_ipv6()
566 Ok(Ipv6Address::new(0x1234, 0x5678, 0, 0, 0, 0, 0, 0)) in test_ipv6()
570 Ok(Ipv6Address::new(0x1234, 0x5678, 0, 0, 0, 0, 0x8765, 0x4321)) in test_ipv6()
576 Ok(Ipv6Address::new(0x4444, 0x0333, 0x0022, 0x0001, 0, 0, 0, 4)) in test_ipv6()
580 Ok(Ipv6Address::new(1, 1, 1, 1, 1, 1, 0, 0)) in test_ipv6()
584 Ok(Ipv6Address::new(0, 0, 1, 1, 1, 1, 1, 1)) in test_ipv6()
644 Ok(IpAddress::Ipv6(Ipv6Address::new( in test_ip_ipv6()
657 Ok(Ipv4Cidr::new(Ipv4Address([127, 0, 0, 1]), 8u8)), in test_cidr_ipv4()
661 Ok(Ipv4Cidr::new(Ipv4Address([192, 168, 1, 1]), 24u8)), in test_cidr_ipv4()
665 Ok(Ipv4Cidr::new(Ipv4Address([8, 8, 8, 8]), 32u8)), in test_cidr_ipv4()
669 Ok(Ipv4Cidr::new(Ipv4Address([8, 8, 8, 8]), 0u8)), in test_cidr_ipv4()
689 Ok(Ipv6Cidr::new( in test_cidr_ipv6()
690 Ipv6Address::new(0xfe80, 0, 0, 0, 0, 0, 0, 1), in test_cidr_ipv6()
696 Ok(Ipv6Cidr::new( in test_cidr_ipv6()
697 Ipv6Address::new(0xfe80, 0, 0, 0, 0, 0, 0, 0), in test_cidr_ipv6()
701 ("::1/128", Ok(Ipv6Cidr::new(Ipv6Address::LOOPBACK, 128u8))), in test_cidr_ipv6()
702 ("::/128", Ok(Ipv6Cidr::new(Ipv6Address::UNSPECIFIED, 128u8))), in test_cidr_ipv6()
705 Ok(Ipv6Cidr::new( in test_cidr_ipv6()
706 Ipv6Address::new(0xfe80, 0, 0, 0, 0, 0, 0, 1), in test_cidr_ipv6()