[][src]Trait domain::base::octets::Compose

pub trait Compose {
    fn compose<T: OctetsBuilder>(&self, target: &mut T) -> Result<(), ShortBuf>;

    fn compose_canonical<T: OctetsBuilder>(
        &self,
        target: &mut T
    ) -> Result<(), ShortBuf> { ... } }

A type that knows how to compose itself into an octets builder.

The term ‘composing’ refers to the process of creating a DNS wire-format representation of a value’s data by appending this representation to the end of an octets builder.

The trait supports two different representations: a concrete and a canonical representation. The former represents the actual data of the value. For instance, it reflects the capitalisation of strings. The canonical representation is used when calculating digests or ordering values. Typically, it ignores capitalization and never compresses domain names. See the documentation of CanonicalOrd for more details on canonical representation.

Required methods

fn compose<T: OctetsBuilder>(&self, target: &mut T) -> Result<(), ShortBuf>

Appends the concrete representation of the value to the target.

If the representation doesn’t fit into the builder, returns an error. In this case the target is considered undefined. If it is supposed to be reused, it needs to be reset specifically.

Loading content...

Provided methods

fn compose_canonical<T: OctetsBuilder>(
    &self,
    target: &mut T
) -> Result<(), ShortBuf>

Appends the canonical representation of the value to the target.

If the representation doesn’t fit into the builder, returns an error. In this case the target is considered undefined. If it is supposed to be reused, it needs to be reset specifically.

Loading content...

Implementations on Foreign Types

impl<'a, C: Compose + ?Sized> Compose for &'a C[src]

impl Compose for i8[src]

impl Compose for u8[src]

impl Compose for i16[src]

impl Compose for u16[src]

impl Compose for i32[src]

impl Compose for u32[src]

Loading content...

Implementors

impl Compose for Class[src]

impl Compose for DigestAlg[src]

impl Compose for Nsec3HashAlg[src]

impl Compose for Opcode[src]

impl Compose for OptionCode[src]

impl Compose for TsigRcode[src]

impl Compose for Rtype[src]

impl Compose for SecAlg[src]

impl Compose for HeaderSection[src]

impl Compose for Label[src]

impl Compose for Ipv4Addr[src]

impl Compose for Ipv6Addr[src]

impl Compose for Expire[src]

impl Compose for TcpKeepalive[src]

impl Compose for Padding[src]

impl Compose for ClientSubnet[src]

impl Compose for Cookie[src]

impl Compose for OptHeader[src]

impl Compose for OptionHeader[src]

impl Compose for Serial[src]

impl Compose for A[src]

impl Compose for Time48[src]

impl Compose for Aaaa[src]

impl<L: ToRelativeDname, R: ToEitherDname> Compose for domain::base::name::Chain<L, R>[src]

impl<N: ToDname> Compose for Question<N>[src]

impl<N: ToDname> Compose for Cname<N>[src]

impl<N: ToDname> Compose for Mb<N>[src]

impl<N: ToDname> Compose for Md<N>[src]

impl<N: ToDname> Compose for Mf<N>[src]

impl<N: ToDname> Compose for Mg<N>[src]

impl<N: ToDname> Compose for Minfo<N>[src]

impl<N: ToDname> Compose for Mr<N>[src]

impl<N: ToDname> Compose for Mx<N>[src]

impl<N: ToDname> Compose for Ns<N>[src]

impl<N: ToDname> Compose for Ptr<N>[src]

impl<N: ToDname> Compose for Soa<N>[src]

impl<N: ToDname> Compose for domain::rdata::rfc6672::Dname<N>[src]

impl<N: ToDname, D: RecordData> Compose for Record<N, D>[src]

impl<N: Compose> Compose for Srv<N>[src]

impl<Name: Compose> Compose for RecordHeader<Name>[src]

impl<Name: Compose> Compose for ProtoRrsig<Name>[src]

impl<O, N> Compose for AllRecordData<O, N> where
    O: AsRef<[u8]>,
    N: ToDname
[src]

impl<O, N> Compose for MasterRecordData<O, N> where
    O: AsRef<[u8]>,
    N: ToDname
[src]

impl<O: AsRef<[u8]>, N: Compose> Compose for Tsig<O, N>[src]

impl<Octets, R: ToDname> Compose for domain::base::name::Chain<UncertainDname<Octets>, R> where
    Octets: AsRef<[u8]>,
    R: ToDname
[src]

impl<Octets: AsRef<[u8]> + ?Sized> Compose for CharStr<Octets>[src]

impl<Octets: AsRef<[u8]> + ?Sized> Compose for domain::base::Dname<Octets>[src]

impl<Octets: AsRef<[u8]> + ?Sized> Compose for RelativeDname<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for UncertainDname<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for AllOptData<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for Opt<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for UnknownOptData<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for UnknownRecordData<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for Nsid<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for Dau<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for Dhu<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for N3u<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for domain::base::opt::rfc7901::Chain<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for KeyTag<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for Hinfo<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for Null<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for Txt<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for Dnskey<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for Ds<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for RtypeBitmap<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for Nsec3<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for Nsec3param<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for Cdnskey<Octets>[src]

impl<Octets: AsRef<[u8]>> Compose for Cds<Octets>[src]

impl<Octets: AsRef<[u8]>, Name: Compose> Compose for Nsec<Octets, Name>[src]

impl<Octets: AsRef<[u8]>, Name: Compose> Compose for Rrsig<Octets, Name>[src]

impl<Ref: AsRef<[u8]>> Compose for ParsedDname<Ref>[src]

Loading content...