Lines Matching refs:new

18     let name = Name::new("example.com.")?;  in small_test_msg()
37 body: Some(Box::new(AResource { a: [127, 0, 0, 1] })), in small_test_msg()
46 body: Some(Box::new(AResource { a: [127, 0, 0, 1] })), in small_test_msg()
55 body: Some(Box::new(AResource { a: [127, 0, 0, 1] })), in small_test_msg()
61 let name = Name::new("foo.bar.example.com.")?; in large_test_msg()
81 body: Some(Box::new(AResource { a: [127, 0, 0, 1] })), in large_test_msg()
90 body: Some(Box::new(AResource { a: [127, 0, 0, 2] })), in large_test_msg()
99 body: Some(Box::new(AaaaResource { in large_test_msg()
110 body: Some(Box::new(CnameResource { in large_test_msg()
111 cname: Name::new("alias.example.com.")?, in large_test_msg()
121 body: Some(Box::new(SoaResource { in large_test_msg()
122 ns: Name::new("ns1.example.com.")?, in large_test_msg()
123 mbox: Name::new("mb.example.com.")?, in large_test_msg()
138 body: Some(Box::new(PtrResource { in large_test_msg()
139 ptr: Name::new("ptr.example.com.")?, in large_test_msg()
149 body: Some(Box::new(MxResource { in large_test_msg()
151 mx: Name::new("mx.example.com.")?, in large_test_msg()
161 body: Some(Box::new(SrvResource { in large_test_msg()
165 target: Name::new("srv.example.com.")?, in large_test_msg()
177 body: Some(Box::new(NsResource { in large_test_msg()
178 ns: Name::new("ns1.example.com.")?, in large_test_msg()
188 body: Some(Box::new(NsResource { in large_test_msg()
189 ns: Name::new("ns2.example.com.")?, in large_test_msg()
201 body: Some(Box::new(TxtResource { in large_test_msg()
212 body: Some(Box::new(TxtResource { in large_test_msg()
218 body: Some(Box::new(OptResource { in large_test_msg()
241 let name = Name::new(want)?; in test_name_string()
250 name: Name::new(".")?, in test_question_pack_unpack()
254 let buf = want.pack(vec![0; 1], &mut Some(HashMap::new()), 1)?; in test_question_pack_unpack()
297 let name = Name::new(test)?; in test_name()
320 let input = Name::new(input)?; in test_name_pack_unpack()
321 let result = input.pack(vec![], &mut Some(HashMap::new()), 0); in test_name_pack_unpack()
335 let want = Name::new(want)?; in test_name_pack_unpack()
359 let name = Name::new("example.com.")?; in test_incompressible_name()
360 let mut compression = Some(HashMap::new()); in test_incompressible_name()
418 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.resource_body().map(|_| ()) }), in test_resource_not_started()
422 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.resource_body().map(|_| ()) }), in test_resource_not_started()
426 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.resource_body().map(|_| ()) }), in test_resource_not_started()
430 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.resource_body().map(|_| ()) }), in test_resource_not_started()
434 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.resource_body().map(|_| ()) }), in test_resource_not_started()
438 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.resource_body().map(|_| ()) }), in test_resource_not_started()
442 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.resource_body().map(|_| ()) }), in test_resource_not_started()
446 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.resource_body().map(|_| ()) }), in test_resource_not_started()
450 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.resource_body().map(|_| ()) }), in test_resource_not_started()
466 let want = Box::new(SrvResource { in test_srv_pack_unpack()
470 target: Name::new("srv.example.com.")?, in test_srv_pack_unpack()
487 name: Name::new(".")?, in test_dns_pack_unpack()
514 name: Name::new(".")?, in test_dns_append_pack_unpack()
612 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.question().map(|_| ()) }), in test_skip_after_read()
616 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.answer().map(|_| ()) }), in test_skip_after_read()
620 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.authority().map(|_| ()) }), in test_skip_after_read()
624 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.additional().map(|_| ()) }), in test_skip_after_read()
653 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.skip_all_questions() }), in test_skip_not_started()
657 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.skip_all_answers() }), in test_skip_not_started()
661 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.skip_all_authorities() }), in test_skip_not_started()
665 Box::new(|p: &mut Parser<'_>| -> Result<()> { p.skip_all_additionals() }), in test_skip_not_started()
753 let mut str255 = String::new(); in test_very_long_txt()
760 name: Name::new("foo.bar.example.com.")?, in test_very_long_txt()
765 body: Some(Box::new(TxtResource { in test_very_long_txt()
778 let buf = want.pack(vec![], &mut Some(HashMap::new()), 0)?; in test_very_long_txt()
797 let mut str256 = String::new(); in test_too_long_txt()
802 if let Err(err) = rb.pack(vec![], &mut Some(HashMap::new()), 0) { in test_too_long_txt()
816 Box::new(|b: &mut Builder| -> Result<()> { b.start_questions() }), in test_start_error()
820 Box::new(|b: &mut Builder| -> Result<()> { b.start_answers() }), in test_start_error()
824 Box::new(|b: &mut Builder| -> Result<()> { b.start_authorities() }), in test_start_error()
828 Box::new(|b: &mut Builder| -> Result<()> { b.start_additionals() }), in test_start_error()
835 Box::new(|| -> Builder { in test_start_error()
845 Box::new(|| -> Builder { in test_start_error()
877 Box::new(|b: &mut Builder| -> Result<()> { in test_builder_resource_error()
886 Box::new(|b: &mut Builder| -> Result<()> { in test_builder_resource_error()
895 Box::new(|b: &mut Builder| -> Result<()> { in test_builder_resource_error()
904 Box::new(|b: &mut Builder| -> Result<()> { in test_builder_resource_error()
913 Box::new(|b: &mut Builder| -> Result<()> { in test_builder_resource_error()
922 Box::new(|b: &mut Builder| -> Result<()> { in test_builder_resource_error()
931 Box::new(|b: &mut Builder| -> Result<()> { in test_builder_resource_error()
940 Box::new(|b: &mut Builder| -> Result<()> { in test_builder_resource_error()
949 Box::new(|b: &mut Builder| -> Result<()> { in test_builder_resource_error()
958 Box::new(|b: &mut Builder| -> Result<()> { in test_builder_resource_error()
970 Box::new(|| -> Builder { in test_builder_resource_error()
980 Box::new(|| -> Builder { in test_builder_resource_error()
990 Box::new(|| -> Builder { in test_builder_resource_error()
1000 Box::new(|| -> Builder { in test_builder_resource_error()
1045 let mut b = Builder::new(&msg.header); in test_builder()
1086 name: Name::new(".")?, in test_resource_pack()
1101 name: Name::new(".")?, in test_resource_pack()
1116 name: Name::new(".")?, in test_resource_pack()
1145 name: Name::new(".")?, in test_resource_pack_length()
1150 body: Some(Box::new(AResource { a: [127, 0, 0, 2] })), in test_resource_pack_length()
1179 name: Name::new(".")?, in test_option_pack_unpack()
1208 name: Name::new(".")?, in test_option_pack_unpack()
1218 body: Some(Box::new(OptResource { in test_option_pack_unpack()
1252 name: Name::new(".")?, in test_option_pack_unpack()
1263 body: Some(Box::new(OptResource { in test_option_pack_unpack()
1276 body: Some(Box::new(OptResource { in test_option_pack_unpack()