pub struct FeedOptions {
pub format: FeedFormat,
pub strict_namespaces: bool,
}Expand description
Plugin options. Default is the canonical default set: the
normalised Atom shape, with namespace well-formedness enforced.
Fields§
§format: FeedFormatThe output shape. Default FeedFormat::Atom.
strict_namespaces: boolEnforce Namespaces in XML 1.0: an element or attribute using an
undeclared prefix (<dc:language> with no xmlns:dc) is an
error.
Defaults to TRUE here, unlike tabnas_xml, which defaults it
off because bare XML 1.0 well-formedness does not require
namespace well-formedness. Feeds are different: Atom is defined by
its namespace, RSS 1.0 is RDF, and every RSS 2.0 extension (dc:,
content:, sy:, georss:) is a prefixed name. An unbound
prefix in a feed is a typo or a truncated document, not an
extension the reader can pass through. Set false for the bare-XML
behaviour.
Implementations§
Source§impl FeedOptions
impl FeedOptions
Sourcepub fn from_value(value: &Value) -> Self
pub fn from_value(value: &Value) -> Self
Read an option bag the way ts/src/feed.ts reads it: format is
whatever string is there and anything unrecognised is the default,
and strictNamespaces is true unless it is explicitly false. An
absent key means “not supplied”, which is the default.
Trait Implementations§
Source§impl Clone for FeedOptions
impl Clone for FeedOptions
Source§impl Debug for FeedOptions
impl Debug for FeedOptions
Source§impl Default for FeedOptions
impl Default for FeedOptions
impl Eq for FeedOptions
Source§impl PartialEq for FeedOptions
impl PartialEq for FeedOptions
impl StructuralPartialEq for FeedOptions
Auto Trait Implementations§
impl Freeze for FeedOptions
impl RefUnwindSafe for FeedOptions
impl Send for FeedOptions
impl Sync for FeedOptions
impl Unpin for FeedOptions
impl UnsafeUnpin for FeedOptions
impl UnwindSafe for FeedOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.