[−][src]Struct odoh_rs::protocol::ObliviousDoHMessage
Main structure used to transfer queries and responses.
It specifies a message type, an identifier of the corresponding ObliviousDoHConfigContents
structure being used, and the encrypted message for the target resolver, or a DNS response
message for the client.
Fields
msg_type: ObliviousDoHMessageType
key_id: Vec<u8>
encrypted_msg: Vec<u8>
Implementations
impl ObliviousDoHMessage
[src]
pub fn new(
msg_type: ObliviousDoHMessageType,
key: Option<ObliviousDoHConfigContents>,
msg: Vec<u8>
) -> Self
[src]
msg_type: ObliviousDoHMessageType,
key: Option<ObliviousDoHConfigContents>,
msg: Vec<u8>
) -> Self
Creates a new ObliviousDoHMessage
based on the type of message.
When the key is not specified, which is the case for ObliviousDoHMessageType::Response
,
it sets the key id to be an empty vector, otherwise it computes the key ID.
Trait Implementations
impl Clone for ObliviousDoHMessage
[src]
fn clone(&self) -> ObliviousDoHMessage
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ObliviousDoHMessage
[src]
impl<'de> Deserialize<'de> for ObliviousDoHMessage
[src]
fn from_bytes(buf: &'de [u8]) -> Result<Self> where
Self: Sized,
Self: SerdeDeserialize<'de>,
[src]
Self: Sized,
Self: SerdeDeserialize<'de>,
impl<'de> Deserialize<'de> for ObliviousDoHMessage
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for ObliviousDoHMessage
[src]
impl Serialize for ObliviousDoHMessage
[src]
Auto Trait Implementations
impl RefUnwindSafe for ObliviousDoHMessage
impl Send for ObliviousDoHMessage
impl Sync for ObliviousDoHMessage
impl Unpin for ObliviousDoHMessage
impl UnwindSafe for ObliviousDoHMessage
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,