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ยง
type KeyIter<'a>: Iterator<Item = &'a str> where Self: 'a
type Value<'a>: AsRef<str> + Into<Cow<'a, str>> + Into<String> where Self: 'a
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>
Sourcefn get_typed<E, T>(
&self,
key: FTMLKey,
f: impl FnOnce(&str) -> Result<T, E>,
) -> Result<T, FTMLError>
fn get_typed<E, T>( &self, key: FTMLKey, f: impl FnOnce(&str) -> Result<T, E>, ) -> Result<T, FTMLError>
ยงErrors
Sourcefn get_typed_vec<E, T>(
&self,
key: FTMLKey,
f: impl FnMut(&str) -> Result<T, E>,
) -> Result<Vec<T>, FTMLError>
fn get_typed_vec<E, T>( &self, key: FTMLKey, f: impl FnMut(&str) -> Result<T, E>, ) -> Result<Vec<T>, FTMLError>
ยงErrors
Sourcefn take_typed<E, T>(
&mut self,
key: FTMLKey,
f: impl FnOnce(&str) -> Result<T, E>,
) -> Result<T, FTMLError>
fn take_typed<E, T>( &mut self, key: FTMLKey, f: impl FnOnce(&str) -> Result<T, E>, ) -> Result<T, FTMLError>
ยงErrors
Sourcefn get_module_uri<E: FTMLExtractor>(
&self,
key: FTMLKey,
_extractor: &mut E,
) -> Result<ModuleURI, FTMLError>
fn get_module_uri<E: FTMLExtractor>( &self, key: FTMLKey, _extractor: &mut E, ) -> Result<ModuleURI, FTMLError>
ยงErrors
Sourcefn get_new_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>
ยงErrors
Sourcefn take_module_uri<E: FTMLExtractor>(
&mut 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>
ยงErrors
Sourcefn take_new_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>
ยงErrors
Sourcefn get_symbol_uri<E: FTMLExtractor>(
&self,
key: FTMLKey,
_extractor: &mut E,
) -> Result<SymbolURI, FTMLError>
fn get_symbol_uri<E: FTMLExtractor>( &self, key: FTMLKey, _extractor: &mut E, ) -> Result<SymbolURI, FTMLError>
ยงErrors
Sourcefn get_new_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>
ยงErrors
Sourcefn take_symbol_uri<E: FTMLExtractor>(
&mut 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>
ยงErrors
Sourcefn take_new_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>
ยงErrors
Sourcefn get_document_uri<E: FTMLExtractor>(
&self,
key: FTMLKey,
_extractor: &mut E,
) -> Result<DocumentURI, FTMLError>
fn get_document_uri<E: FTMLExtractor>( &self, key: FTMLKey, _extractor: &mut E, ) -> Result<DocumentURI, FTMLError>
ยงErrors
Sourcefn take_document_uri<E: FTMLExtractor>(
&mut 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>
ยงErrors
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
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.