Trait Attributes

Source
pub trait Attributes {
    type KeyIter<'a>: Iterator<Item = &'a str>
       where Self: 'a;
    type Value<'a>: AsRef<str> + Into<Cow<'a, str>> + Into<String>
       where Self: 'a;

Show 26 methods // Required methods fn keys(&self) -> Self::KeyIter<'_>; fn value(&self, key: &str) -> Option<Self::Value<'_>>; fn set(&mut self, key: &str, value: &str); fn take(&mut self, key: &str) -> Option<String>; // Provided methods fn get(&self, tag: FTMLKey) -> Option<Self::Value<'_>> { ... } fn remove(&mut self, tag: FTMLKey) -> Option<String> { ... } fn get_typed<E, T>( &self, key: FTMLKey, f: impl FnOnce(&str) -> Result<T, E>, ) -> Result<T, FTMLError> { ... } fn get_typed_vec<E, T>( &self, key: FTMLKey, f: impl FnMut(&str) -> Result<T, E>, ) -> Result<Vec<T>, FTMLError> { ... } fn take_typed<E, T>( &mut self, key: FTMLKey, f: impl FnOnce(&str) -> Result<T, E>, ) -> Result<T, FTMLError> { ... } fn get_section_level(&self, key: FTMLKey) -> Result<SectionLevel, FTMLError> { ... } fn take_section_level( &mut self, key: FTMLKey, ) -> Result<SectionLevel, FTMLError> { ... } fn get_language(&self, key: FTMLKey) -> Result<Language, FTMLError> { ... } fn take_language(&mut self, key: FTMLKey) -> Result<Language, FTMLError> { ... } fn get_module_uri<E: FTMLExtractor>( &self, key: FTMLKey, _extractor: &mut E, ) -> Result<ModuleURI, FTMLError> { ... } fn get_new_module_uri<E: FTMLExtractor>( &self, key: FTMLKey, extractor: &mut E, ) -> Result<ModuleURI, FTMLError> { ... } fn take_module_uri<E: FTMLExtractor>( &mut self, key: FTMLKey, _extractor: &mut E, ) -> Result<ModuleURI, FTMLError> { ... } fn take_new_module_uri<E: FTMLExtractor>( &mut self, key: FTMLKey, extractor: &mut E, ) -> Result<ModuleURI, FTMLError> { ... } fn get_symbol_uri<E: FTMLExtractor>( &self, key: FTMLKey, _extractor: &mut E, ) -> Result<SymbolURI, FTMLError> { ... } fn get_new_symbol_uri<E: FTMLExtractor>( &self, key: FTMLKey, extractor: &mut E, ) -> Result<SymbolURI, FTMLError> { ... } fn take_symbol_uri<E: FTMLExtractor>( &mut self, key: FTMLKey, _extractor: &mut E, ) -> Result<SymbolURI, FTMLError> { ... } fn take_new_symbol_uri<E: FTMLExtractor>( &mut self, key: FTMLKey, extractor: &mut E, ) -> Result<SymbolURI, FTMLError> { ... } fn get_document_uri<E: FTMLExtractor>( &self, key: FTMLKey, _extractor: &mut E, ) -> Result<DocumentURI, FTMLError> { ... } fn take_document_uri<E: FTMLExtractor>( &mut self, key: FTMLKey, _extractor: &mut E, ) -> Result<DocumentURI, FTMLError> { ... } fn get_id<E: FTMLExtractor>( &self, extractor: &mut E, prefix: Cow<'static, str>, ) -> Box<str> { ... } fn get_bool(&self, key: FTMLKey) -> bool { ... } fn take_bool(&mut self, key: FTMLKey) -> bool { ... }
}

Required Associated Typesยง

Source

type KeyIter<'a>: Iterator<Item = &'a str> where Self: 'a

Source

type Value<'a>: AsRef<str> + Into<Cow<'a, str>> + Into<String> where Self: 'a

Required Methodsยง

Source

fn keys(&self) -> Self::KeyIter<'_>

Source

fn value(&self, key: &str) -> Option<Self::Value<'_>>

Source

fn set(&mut self, key: &str, value: &str)

Source

fn take(&mut self, key: &str) -> Option<String>

Provided Methodsยง

Source

fn get(&self, tag: FTMLKey) -> Option<Self::Value<'_>>

Source

fn remove(&mut self, tag: FTMLKey) -> Option<String>

Source

fn get_typed<E, T>( &self, key: FTMLKey, f: impl FnOnce(&str) -> Result<T, E>, ) -> Result<T, FTMLError>

ยงErrors
Source

fn get_typed_vec<E, T>( &self, key: FTMLKey, f: impl FnMut(&str) -> Result<T, E>, ) -> Result<Vec<T>, FTMLError>

ยงErrors
Source

fn take_typed<E, T>( &mut self, key: FTMLKey, f: impl FnOnce(&str) -> Result<T, E>, ) -> Result<T, FTMLError>

ยงErrors
Source

fn get_section_level(&self, key: FTMLKey) -> Result<SectionLevel, FTMLError>

ยงErrors
Source

fn take_section_level( &mut self, key: FTMLKey, ) -> Result<SectionLevel, FTMLError>

ยงErrors
Source

fn get_language(&self, key: FTMLKey) -> Result<Language, FTMLError>

ยงErrors
Source

fn take_language(&mut self, key: FTMLKey) -> Result<Language, FTMLError>

ยงErrors
Source

fn get_module_uri<E: FTMLExtractor>( &self, key: FTMLKey, _extractor: &mut E, ) -> Result<ModuleURI, FTMLError>

ยงErrors
Source

fn get_new_module_uri<E: FTMLExtractor>( &self, key: FTMLKey, extractor: &mut E, ) -> Result<ModuleURI, FTMLError>

ยงErrors
Source

fn take_module_uri<E: FTMLExtractor>( &mut self, key: FTMLKey, _extractor: &mut E, ) -> Result<ModuleURI, FTMLError>

ยงErrors
Source

fn take_new_module_uri<E: FTMLExtractor>( &mut self, key: FTMLKey, extractor: &mut E, ) -> Result<ModuleURI, FTMLError>

ยงErrors
Source

fn get_symbol_uri<E: FTMLExtractor>( &self, key: FTMLKey, _extractor: &mut E, ) -> Result<SymbolURI, FTMLError>

ยงErrors
Source

fn get_new_symbol_uri<E: FTMLExtractor>( &self, key: FTMLKey, extractor: &mut E, ) -> Result<SymbolURI, FTMLError>

ยงErrors
Source

fn take_symbol_uri<E: FTMLExtractor>( &mut self, key: FTMLKey, _extractor: &mut E, ) -> Result<SymbolURI, FTMLError>

ยงErrors
Source

fn take_new_symbol_uri<E: FTMLExtractor>( &mut self, key: FTMLKey, extractor: &mut E, ) -> Result<SymbolURI, FTMLError>

ยงErrors
Source

fn get_document_uri<E: FTMLExtractor>( &self, key: FTMLKey, _extractor: &mut E, ) -> Result<DocumentURI, FTMLError>

ยงErrors
Source

fn take_document_uri<E: FTMLExtractor>( &mut self, key: FTMLKey, _extractor: &mut E, ) -> Result<DocumentURI, FTMLError>

ยงErrors
Source

fn get_id<E: FTMLExtractor>( &self, extractor: &mut E, prefix: Cow<'static, str>, ) -> Box<str>

Source

fn get_bool(&self, key: FTMLKey) -> bool

Source

fn take_bool(&mut self, key: FTMLKey) -> bool

Dyn Compatibilityยง

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementorsยง