pub struct Section {
pub section_type: SectionType,
pub content: SectionContent,
pub inline_options: InlineOptions,
pub raw_content: String,
pub start_line: usize,
pub end_line: usize,
pub attributes: Vec<GctfAttribute>,
}Expand description
A section in the .gctf file
Fields§
§section_type: SectionTypeSection type
content: SectionContentContent of the section (raw text, typically JSON)
inline_options: InlineOptionsInline options (for sections that support them)
raw_content: StringRaw text content of the section (preserved for formatting)
start_line: usizeLine number where section starts
end_line: usizeLine number where section ends
attributes: Vec<GctfAttribute>Attributes declared on this section
Implementations§
Source§impl Section
impl Section
pub fn get_attribute(&self, name: &str) -> Option<&GctfAttribute>
pub fn get_timeout(&self) -> Option<u64>
pub fn get_retry(&self) -> Option<u32>
pub fn get_skip(&self) -> bool
pub fn has_tag(&self, tag: &str) -> bool
pub fn get_compression(&self) -> Option<String>
pub fn get_repeat(&self) -> Option<u32>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Section
impl<'de> Deserialize<'de> for Section
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Section, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Section, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Section
impl Serialize for Section
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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 UnsafeUnpin 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