Repo of no-std crates for my personal embedded projects
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add txt records to mDNS service struct

authored by

Sachymetsu and committed by
Tangled
b76d1dc1 7f489f33

+6 -1
+6 -1
sachy-mdns/src/service.rs
··· 62 62 hostname: String, 63 63 ip: Option<IpAddr>, 64 64 port: u16, 65 + txt: Vec<&'static str>, 65 66 } 66 67 67 68 impl Service { ··· 71 72 hostname: impl Into<String>, 72 73 ip: Option<IpAddr>, 73 74 port: u16, 75 + txt: impl Into<Vec<&'static str>>, 74 76 ) -> Self { 75 77 let service_type = service_type.into(); 76 78 let mut instance = instance.into(); ··· 86 88 hostname, 87 89 ip, 88 90 port, 91 + txt: txt.into(), 89 92 } 90 93 } 91 94 ··· 142 145 atype: QType::TXT, 143 146 aclass, 144 147 ttl: 120, 145 - record: Record::TXT(TXT { text: Vec::new() }), 148 + record: Record::TXT(TXT { 149 + text: self.txt.clone(), 150 + }), 146 151 }) 147 152 } 148 153