pub fn build(self) -> MessageHeader {
        let destination = self
            .destination
            .unwrap_or(self.old_data.destination.clone());
        let msg_id = self.old_data.get_msg_id().to_string();
        let payload = self.payload.unwrap_or(self.old_data.payload);
        // let msg_id = MessageHeader::create_msg_id(payload.clone());

        MessageHeader {
            sender: self.sender,
            destination,
            hops: self.hops.unwrap_or(self.old_data.hops),
            delay: Utc::now().timestamp_nanos(),
            ttl: self.ttl.unwrap_or(self.old_data.ttl),
            payload,
            msg_id,
        }
    }
///Consumes the current MessageHeaderBuilder to produce a MessageHeader
Consumes the current MessageHeaderBuilder to produce a MessageHeader
Consumes the current MessageHeaderBuilder to produce a MessageHeader
pub fn build(self) -> MessageHeader {
        let destination = self
            .destination
            .unwrap_or(self.old_data.destination.clone());
        let msg_id = self.old_data.get_msg_id().to_string();
        let payload = self.payload.unwrap_or(self.old_data.payload);
        // let msg_id = MessageHeader::create_msg_id(payload.clone());
        MessageHeader {
            sender: self.sender,
            destination,
            hops: self.hops.unwrap_or(self.old_data.hops),
            delay: Utc::now().timestamp_nanos(),
            ttl: self.ttl.unwrap_or(self.old_data.ttl),
            payload,
            msg_id,
        }
    }
pub fn build ( self ) -> MessageHeader { let destination = self . destination . unwrap_or ( self . old_data . destination . clone ( ) ) ; let msg_id = self . old_data . get_msg_id ( ) . to_string ( ) ; let payload = self . payload . unwrap_or ( self . old_data . payload ) ; // let msg_id = MessageHeader::create_msg_id(payload.clone()); MessageHeader { sender : self . sender , destination , hops : self . hops . unwrap_or ( self . old_data . hops ) , delay : Utc :: now ( ) . timestamp_nanos ( ) , ttl : self . ttl . unwrap_or ( self . old_data . ttl ) , payload , msg_id , } }
Consumes the current MessageHeaderBuilder to produce a MessageHeader
Consumes the current MessageHeaderBuilder to produce a MessageHeader
self