pub struct Header(pub Vec<(usize, String, String)>);Tuple Fields§
§0: Vec<(usize, String, String)>Implementations§
Source§impl Header
impl Header
Sourcepub fn uncommented_headers(&self) -> Header
pub fn uncommented_headers(&self) -> Header
returns a copy of Header after processing comments “/” and escape “\/” (if any)
only used by Section::remove_comments() and SubSection::remove_comments()
pub fn without_line_number(&self) -> Self
pub fn add(&mut self, line_number: &usize, name: &str, value: &str)
pub fn bool_with_default( &self, doc_id: &str, line_number: usize, name: &str, def: bool, ) -> Result<bool>
pub fn bool_optional( &self, doc_id: &str, line_number: usize, name: &str, ) -> Result<Option<bool>>
pub fn bool(&self, doc_id: &str, line_number: usize, name: &str) -> Result<bool>
pub fn i32_with_default( &self, doc_id: &str, line_number: usize, name: &str, def: i32, ) -> Result<i32>
pub fn i32_optional( &self, doc_id: &str, line_number: usize, name: &str, ) -> Result<Option<i32>>
pub fn i32(&self, doc_id: &str, line_number: usize, name: &str) -> Result<i32>
pub fn i64(&self, doc_id: &str, line_number: usize, name: &str) -> Result<i64>
pub fn i64_optional( &self, doc_id: &str, line_number: usize, name: &str, ) -> Result<Option<i64>>
pub fn f64(&self, doc_id: &str, line_number: usize, name: &str) -> Result<f64>
pub fn f64_optional( &self, doc_id: &str, line_number: usize, name: &str, ) -> Result<Option<f64>>
pub fn str_with_default<'a>( &'a self, doc_id: &str, line_number: usize, name: &str, def: &'a str, ) -> Result<&'a str>
pub fn get_events( &self, line_number: usize, doc: &TDoc<'_>, arguments: &Map<Kind>, ) -> Result<Vec<Event>>
pub fn str_optional( &self, doc_id: &str, line_number: usize, name: &str, ) -> Result<Option<&str>>
pub fn conditional_str( &self, doc: &TDoc<'_>, line_number: usize, name: &str, arguments: &Map<Kind>, ) -> Result<Vec<(usize, String, Option<String>, bool)>>
pub fn str(&self, doc_id: &str, line_number: usize, name: &str) -> Result<&str>
pub fn string( &self, doc_id: &str, line_number: usize, name: &str, ) -> Result<String>
pub fn string_optional( &self, doc_id: &str, line_number: usize, name: &str, ) -> Result<Option<String>>
pub fn string_with_default( &self, doc_id: &str, line_number: usize, name: &str, def: &str, ) -> Result<String>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Header
impl<'de> Deserialize<'de> for Header
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more