pub struct WimParser { /* private fields */ }
Expand description
WIM 文件解析器
Implementations§
Source§impl WimParser
impl WimParser
Sourcepub fn read_header(&mut self) -> Result<&WimHeader>
pub fn read_header(&mut self) -> Result<&WimHeader>
读取并解析 WIM 文件头
Sourcepub fn read_xml_data(&mut self) -> Result<()>
pub fn read_xml_data(&mut self) -> Result<()>
读取并解析 XML 数据
Sourcepub fn parse_single_image_xml(&self, image_xml: &str) -> Result<ImageInfo>
pub fn parse_single_image_xml(&self, image_xml: &str) -> Result<ImageInfo>
解析单个镜像的 XML 信息
Sourcepub fn parse_arch_from_xml(&self, image_xml: &str) -> Option<String>
pub fn parse_arch_from_xml(&self, image_xml: &str) -> Option<String>
从XML中的ARCH标签解析架构信息
Sourcepub fn get_images(&self) -> &[ImageInfo]
pub fn get_images(&self) -> &[ImageInfo]
获取所有镜像信息
Sourcepub fn get_header(&self) -> Option<&WimHeader>
pub fn get_header(&self) -> Option<&WimHeader>
获取文件头信息
Sourcepub fn has_multiple_images(&self) -> bool
pub fn has_multiple_images(&self) -> bool
检查是否包含多个镜像
Sourcepub fn get_image_count(&self) -> u32
pub fn get_image_count(&self) -> u32
获取镜像数量
Sourcepub fn is_compressed(&self) -> bool
pub fn is_compressed(&self) -> bool
检查是否为压缩文件
Sourcepub fn get_compression_type(&self) -> Option<&'static str>
pub fn get_compression_type(&self) -> Option<&'static str>
获取压缩类型
Sourcepub fn parse_full(&mut self) -> Result<()>
pub fn parse_full(&mut self) -> Result<()>
完整解析 WIM 文件(头部 + XML 数据)
Source§impl WimParser
impl WimParser
Sourcepub fn get_version_summary(&self) -> Vec<String>
pub fn get_version_summary(&self) -> Vec<String>
获取所有镜像的版本摘要
Sourcepub fn get_primary_version(&self) -> Option<String>
pub fn get_primary_version(&self) -> Option<String>
获取主要版本信息(如果有多个镜像,返回最常见的版本)
Sourcepub fn get_primary_architecture(&self) -> Option<String>
pub fn get_primary_architecture(&self) -> Option<String>
获取主要架构信息(如果有多个镜像,返回最常见的架构)
Sourcepub fn has_version(&self, version: &str) -> bool
pub fn has_version(&self, version: &str) -> bool
检查是否包含指定版本的镜像
Sourcepub fn has_architecture(&self, arch: &str) -> bool
pub fn has_architecture(&self, arch: &str) -> bool
检查是否包含指定架构的镜像
Sourcepub fn get_windows_info(&self) -> Option<WindowsInfo>
pub fn get_windows_info(&self) -> Option<WindowsInfo>
获取Windows版本的详细信息
Auto Trait Implementations§
impl Freeze for WimParser
impl RefUnwindSafe for WimParser
impl Send for WimParser
impl Sync for WimParser
impl Unpin for WimParser
impl UnwindSafe for WimParser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more