Trait hickory_proto::op::message::MessageFinalizer

source ·
pub trait MessageFinalizer:
    Send
    + Sync
    + 'static {
    // Required method
    fn finalize_message(
        &self,
        message: &Message,
        current_time: u32,
    ) -> ProtoResult<(Vec<Record>, Option<MessageVerifier>)>;

    // Provided method
    fn should_finalize_message(&self, message: &Message) -> bool { ... }
}
Expand description

A trait for performing final amendments to a Message before it is sent.

An example of this is a SIG0 signer, which needs the final form of the message, but then needs to attach additional data to the body of the message.

Required Methods§

source

fn finalize_message( &self, message: &Message, current_time: u32, ) -> ProtoResult<(Vec<Record>, Option<MessageVerifier>)>

The message taken in should be processed and then return Records which should be appended to the additional section of the message.

§Arguments
  • message - message to process
  • current_time - the current time as specified by the system, it’s not recommended to read the current time as that makes testing complicated.
§Return

A vector to append to the additionals section of the message, sorted in the order as they should appear in the message.

Provided Methods§

source

fn should_finalize_message(&self, message: &Message) -> bool

Return whether the message requires further processing before being sent By default, returns true for AXFR and IXFR queries, and Update and Notify messages

Implementors§

source§

impl MessageFinalizer for SigSigner

Available on crate feature dnssec only.
source§

impl MessageFinalizer for TSigner

Available on crate feature dnssec only.
source§

impl MessageFinalizer for NoopMessageFinalizer