pub struct SourceRegistry { /* private fields */ }Expand description
Registry mapping URI schemes to opener functions.
Implementations§
Source§impl SourceRegistry
impl SourceRegistry
Sourcepub fn new() -> Self
pub fn new() -> Self
Empty registry. Callers must register at least the file driver
before calling open.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Registry pre-populated with the built-in file driver. Bare paths
(without a scheme) also dispatch to it.
Sourcepub fn register(&mut self, scheme: &str, opener: OpenSourceFn)
pub fn register(&mut self, scheme: &str, opener: OpenSourceFn)
Register an opener for a scheme. Schemes are normalised to ASCII lowercase. Replaces any prior registration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SourceRegistry
impl RefUnwindSafe for SourceRegistry
impl Send for SourceRegistry
impl Sync for SourceRegistry
impl Unpin for SourceRegistry
impl UnsafeUnpin for SourceRegistry
impl UnwindSafe for SourceRegistry
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