use crate::*;
use super::Wrap;
impl<'a, Pe32: pe32::Pe<'a>, Pe64: pe64::Pe<'a>> Wrap<pe32::tls::Tls<'a, Pe32>, pe64::tls::Tls<'a, Pe64>> {
#[inline]
pub fn pe(&self) -> Wrap<Pe32, Pe64> {
match self {
Wrap::T32(tls) => Wrap::T32(tls.pe()),
Wrap::T64(tls) => Wrap::T64(tls.pe()),
}
}
#[inline]
pub fn image(&self) -> Wrap<&'a image::IMAGE_TLS_DIRECTORY32, &'a image::IMAGE_TLS_DIRECTORY64> {
match self {
Wrap::T32(tls) => Wrap::T32(tls.image()),
Wrap::T64(tls) => Wrap::T64(tls.image()),
}
}
#[inline]
pub fn raw_data(&self) -> Result<&'a [u8]> {
match self {
Wrap::T32(tls) => tls.raw_data(),
Wrap::T64(tls) => tls.raw_data(),
}
}
#[inline]
pub fn slot(&self) -> Result<&'a u32> {
match self {
Wrap::T32(tls) => tls.slot(),
Wrap::T64(tls) => tls.slot(),
}
}
#[inline]
pub fn callbacks(&self) -> Result<Wrap<&'a [u32], &'a [u64]>> {
match self {
Wrap::T32(tls) => Wrap::T32(tls.callbacks()).transpose(),
Wrap::T64(tls) => Wrap::T64(tls.callbacks()).transpose(),
}
}
}