mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-24 18:55:55 +03:00
[GH-ISSUE #1153] how to send a valid MessageResponse with ResponseHandler #616
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#616
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Sherlock-Holo on GitHub (Jun 26, 2020).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1153
I am learning using trust-dns-server and try to write my test server
I try the codes
but cargo check reports an error,
that confuse me because I think this codes should be right
Could anyone tell me how to modify the codes
@bluejekyll commented on GitHub (Jun 29, 2020):
You will either need to cast this, i.e.
let response = &response as &dyn Iteratoror box it,let response = Box::new(response). Lifetimes would be the only reason the first wouldn't work.@mhils commented on GitHub (Jul 5, 2020):
I ran into the same problem and what worked for me was to explicitly specify types:
I'm not much of a Rust expert though, @bluejekyll's answer is probably more correct but less easy to parse for me :)