#[non_exhaustive]
pub enum Section {
Index(IndexSection),
Manifest(ManifestSection),
Atoms(AtomsSection),
Volume(VolumeSection),
}
Expand description
The different sections in a webc file.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
source§impl Section
impl Section
pub fn parse(tag: u8, data: OwnedBuffer) -> Result<Section, SectionError>
pub fn as_index(&self) -> Option<&IndexSection>
pub fn as_manifest(&self) -> Option<&ManifestSection>
pub fn as_atoms(&self) -> Option<&AtomsSection>
pub fn as_volume(&self) -> Option<&VolumeSection>
Trait Implementations§
source§impl From<AtomsSection> for Section
impl From<AtomsSection> for Section
source§fn from(value: AtomsSection) -> Self
fn from(value: AtomsSection) -> Self
Converts to this type from the input type.
source§impl From<IndexSection> for Section
impl From<IndexSection> for Section
source§fn from(value: IndexSection) -> Self
fn from(value: IndexSection) -> Self
Converts to this type from the input type.
source§impl From<ManifestSection> for Section
impl From<ManifestSection> for Section
source§fn from(value: ManifestSection) -> Self
fn from(value: ManifestSection) -> Self
Converts to this type from the input type.
source§impl From<VolumeSection> for Section
impl From<VolumeSection> for Section
source§fn from(value: VolumeSection) -> Self
fn from(value: VolumeSection) -> Self
Converts to this type from the input type.