pub struct ContextHosts;Expand description
Normalizes and maps declared hosts across Saola contexts.
Implementations§
Source§impl ContextHosts
impl ContextHosts
Sourcepub fn normalize<I, S>(domains: I) -> Vec<String>
pub fn normalize<I, S>(domains: I) -> Vec<String>
Normalizes a list of host/URL declarations: lowercased, without scheme, port, or path, skipping empty entries and preserving first-seen order without duplicates.
pub fn normalize_one(raw: &str) -> Option<String>
Sourcepub fn table<'a>(
contexts: impl IntoIterator<Item = &'a ContextSpec>,
) -> Result<BTreeMap<String, String>, ContextError>
pub fn table<'a>( contexts: impl IntoIterator<Item = &'a ContextSpec>, ) -> Result<BTreeMap<String, String>, ContextError>
Maps every claimed host to its owning context slug. Two different contexts cannot claim the same host.
Auto Trait Implementations§
impl Forget for ContextHosts
impl Freeze for ContextHosts
impl Move for ContextHosts
impl RefUnwindSafe for ContextHosts
impl Send for ContextHosts
impl Sync for ContextHosts
impl Unpin for ContextHosts
impl UnsafeUnpin for ContextHosts
impl UnwindSafe for ContextHosts
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