Lines Matching refs:new
71 pub const fn new( in new() method
344 pub const fn new(address: Address, prefix_len: u8) -> Cidr { in new() method
795 Address::new(0xfe80, 0, 0, 0, 0, 0x7f00, 0x0000, 0x0001) in test_address_format()
804 format!("{}", Address::from(Ipv4Address::new(192, 168, 1, 1))) in test_address_format()
811 Address::new(0xff02, 0, 0, 0, 0, 0, 0, 1), in test_new()
815 Address::new(0xff02, 0, 0, 0, 0, 0, 0, 2), in test_new()
818 assert_eq!(Address::new(0, 0, 0, 0, 0, 0, 0, 1), Address::LOOPBACK); in test_new()
819 assert_eq!(Address::new(0, 0, 0, 0, 0, 0, 0, 0), Address::UNSPECIFIED); in test_new()
820 assert_eq!(Address::new(0xfe80, 0, 0, 0, 0, 0, 0, 1), LINK_LOCAL_ADDR); in test_new()
866 let addr = Address::new(0x0123, 0x4567, 0x89ab, 0, 0, 0, 0, 1); in test_mask()
893 assert!(Address::from(Ipv4Address::new(192, 168, 1, 1)).is_ipv4_mapped()); in test_is_ipv4_mapped()
901 let ipv4 = Ipv4Address::new(192, 168, 1, 1); in test_as_ipv4()
910 Address::from(Ipv4Address::new(192, 168, 1, 1)) in test_from_ipv4_address()
914 Address::from(Ipv4Address::new(222, 1, 41, 90)) in test_from_ipv4_address()
923 let cidr = Cidr::new(LINK_LOCAL_ADDR, 56); in test_cidr()
1041 for subnet in subnets.iter().map(|&(a, p)| Cidr::new(Address(a), p)) { in test_cidr()
1045 for subnet in not_subnets.iter().map(|&(a, p)| Cidr::new(Address(a), p)) { in test_cidr()
1049 let cidr_without_prefix = Cidr::new(LINK_LOCAL_ADDR, 0); in test_cidr()
1222 PrettyPrinter::<Packet<&'static [u8]>>::new("\n", &&REPR_PACKET_BYTES[..]) in test_pretty_print()