Trait DynXsoRegistryLookup

Source
pub trait DynXsoRegistryLookup<T: ?Sized> {
    // Required method
    fn make_builder(
        &self,
        name: QName,
        attrs: AttrMap,
        ctx: &Context<'_>,
    ) -> Result<Box<dyn FromEventsBuilder<Output = Box<T>>>, FromEventsError>;
}
Expand description

Trait for a builder registry supports constructing elements.

Required Methods§

Source

fn make_builder( &self, name: QName, attrs: AttrMap, ctx: &Context<'_>, ) -> Result<Box<dyn FromEventsBuilder<Output = Box<T>>>, FromEventsError>

Make a builder for the given element header.

This tries all applicable FromXml implementations which have previously been added via add in unspecified order. The first implementation to either fail or succeed at constructing a builder determines the result. Implementations which return a FromEventsError::Mismatch are ignored.

If all applicable implementations return Mismatch, this function returns Mismatch, too.

Implementors§

Source§

impl<T: ?Sized + 'static> DynXsoRegistryLookup<T> for BuilderRegistry<T>

Available on crate feature std only.