pub struct ContextRegistry { /* private fields */ }Expand description
Registry of declared Saola contexts and routes, used to build a RouteIndex.
Implementations§
Source§impl ContextRegistry
impl ContextRegistry
pub fn new() -> Self
pub fn add_context(&mut self, spec: ContextSpec) -> &mut Self
pub fn add_route(&mut self, entry: RouteEntry) -> &mut Self
pub fn contexts(&self) -> &[ContextSpec]
pub fn routes(&self) -> &[RouteEntry]
pub fn build_index(&self, primary_url: &str) -> Result<RouteIndex, ContextError>
Trait Implementations§
Source§impl Clone for ContextRegistry
impl Clone for ContextRegistry
Source§impl Debug for ContextRegistry
impl Debug for ContextRegistry
Auto Trait Implementations§
impl Forget for ContextRegistry
impl Freeze for ContextRegistrywhere
*const u8 is !null: Freeze,
PhantomData<ContextSpec>: Freeze,
PhantomData<RouteEntry>: Freeze,
impl Move for ContextRegistry
impl RefUnwindSafe for ContextRegistry
impl Send for ContextRegistrywhere
RawVecInner: Send,
impl Sync for ContextRegistrywhere
RawVecInner: Sync,
impl Unpin for ContextRegistry
impl UnsafeUnpin for ContextRegistrywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<ContextSpec>: UnsafeUnpin,
PhantomData<RouteEntry>: UnsafeUnpin,
impl UnwindSafe for ContextRegistrywhere
RawVecInner: UnwindSafe,
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