Struct libradicl::rad_types::TagSection
source · pub struct TagSection {
pub label: TagSectionLabel,
pub tags: Vec<TagDesc>,
}
Expand description
A TagSection consists of a series of TagDescs that are logically grouped together as tags for a specific unit
Fields§
§label: TagSectionLabel
Implementations§
source§impl TagSection
impl TagSection
sourcepub fn new_with_label(label: TagSectionLabel) -> Self
pub fn new_with_label(label: TagSectionLabel) -> Self
Create a new tag section with the provided label type, but with no tags descripitons.
sourcepub fn add_tag_desc(&mut self, desc: TagDesc)
pub fn add_tag_desc(&mut self, desc: TagDesc)
Add a TagDesc to the list of tags in this section
source§impl TagSection
impl TagSection
sourcepub fn from_bytes<T: Read>(reader: &mut T) -> Result<Self>
pub fn from_bytes<T: Read>(reader: &mut T) -> Result<Self>
Attempts to read a TagSection from the provided reader
. If the
reader
is positioned at the start of a valid TagSection, then this
TagSection is returned. Otherwise, a description of the error is returned
via an anyhow::Error.
sourcepub fn from_bytes_with_label<T: Read>(
reader: &mut T,
label: TagSectionLabel
) -> Result<Self>
pub fn from_bytes_with_label<T: Read>( reader: &mut T, label: TagSectionLabel ) -> Result<Self>
Attempts to read a TagSection from the provided reader
. If the
reader
is positioned at the start of a valid TagSection, then this
TagSection is returned. Otherwise, a description of the error is returned
via an anyhow::Error. The returned TagSection will be labeled with the
provided label
.
pub fn get_tag_type(&self, name: &str) -> Option<RadType>
Trait Implementations§
source§impl Clone for TagSection
impl Clone for TagSection
source§fn clone(&self) -> TagSection
fn clone(&self) -> TagSection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more