#[non_exhaustive]pub enum Section {
Index(IndexSection),
Manifest(ManifestSection),
Atoms(AtomsSection),
Volume(VolumeSection),
}Available on crate feature
v2 only.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.
Source§impl TryFrom<Section> for AtomsSection
impl TryFrom<Section> for AtomsSection
Source§impl TryFrom<Section> for IndexSection
impl TryFrom<Section> for IndexSection
Source§impl TryFrom<Section> for ManifestSection
impl TryFrom<Section> for ManifestSection
Source§impl TryFrom<Section> for VolumeSection
impl TryFrom<Section> for VolumeSection
impl StructuralPartialEq for Section
Auto Trait Implementations§
impl !Freeze for Section
impl RefUnwindSafe for Section
impl Send for Section
impl Sync for Section
impl Unpin for Section
impl UnwindSafe for Section
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