fn read_soa_minimum(rdata: &Rdata) -> ProcessingResult<u32> {
    let mname_len = Name::validate_uncompressed(rdata).or(Err(ProcessingError::ServFail))?;
    let rname_len =
        Name::validate_uncompressed(&rdata[mname_len..]).or(Err(ProcessingError::ServFail))?;
    let octets = rdata
        .get(mname_len + rname_len + 16..)
        .ok_or(ProcessingError::ServFail)?;
    let array: [u8; 4] = octets.try_into().or(Err(ProcessingError::ServFail))?;
    Ok(u32::from_be_bytes(array))
}
/// Reads the MINIMUM field from the provided SOA RDATA.
Reads the MINIMUM field from the provided SOA RDATA.
Reads the MINIMUM field from the provided SOA RDATA .
fn read_soa_minimum(rdata: &Rdata) -> ProcessingResult<u32> {
    let mname_len = Name::validate_uncompressed(rdata).or(Err(ProcessingError::ServFail))?;
    let rname_len =
        Name::validate_uncompressed(&rdata[mname_len..]).or(Err(ProcessingError::ServFail))?;
    let octets = rdata
        .get(mname_len + rname_len + 16..)
        .ok_or(ProcessingError::ServFail)?;
    let array: [u8; 4] = octets.try_into().or(Err(ProcessingError::ServFail))?;
    Ok(u32::from_be_bytes(array))
}
fn read_soa_minimum ( rdata : & Rdata ) -> ProcessingResult < u32 > { let mname_len = Name :: validate_uncompressed ( rdata ) . or ( Err ( ProcessingError :: ServFail ) ) ? ; let rname_len = Name :: validate_uncompressed ( & rdata [ mname_len .. ] ) . or ( Err ( ProcessingError :: ServFail ) ) ? ; let octets = rdata . get ( mname_len + rname_len + 16 .. ) . ok_or ( ProcessingError :: ServFail ) ? ; let array : [ u8 ; 4 ] = octets . try_into ( ) . or ( Err ( ProcessingError :: ServFail ) ) ? ; Ok ( u32 :: from_be_bytes ( array ) ) }
Reads the MINIMUM field from the provided SOA RDATA.
Reads the MINIMUM field from the provided SOA RDATA .
rdata
&Rdata
rdata
&Rdata