pub struct ExtensionRegistry { /* private fields */ }Expand description
Registry of pluggable read-modes, compressors, and chunkers.
Implementations§
Source§impl ExtensionRegistry
impl ExtensionRegistry
Sourcepub fn new() -> Self
pub fn new() -> Self
An empty registry (no built-ins). Use ExtensionRegistry::with_builtins
for the production set.
Sourcepub fn with_builtins() -> Self
pub fn with_builtins() -> Self
A registry seeded with the built-in transforms — registered through the same public API extensions use.
Sourcepub fn register_read_mode(&mut self, handler: Arc<dyn ReadMode>)
pub fn register_read_mode(&mut self, handler: Arc<dyn ReadMode>)
Register (or replace) a read-mode by its name.
Sourcepub fn register_compressor(&mut self, handler: Arc<dyn Compressor>)
pub fn register_compressor(&mut self, handler: Arc<dyn Compressor>)
Register (or replace) a compressor by its name.
Sourcepub fn register_chunker(&mut self, handler: Arc<dyn Chunker>)
pub fn register_chunker(&mut self, handler: Arc<dyn Chunker>)
Register (or replace) a chunker by its name.
Sourcepub fn compressor(&self, name: &str) -> Option<Arc<dyn Compressor>>
pub fn compressor(&self, name: &str) -> Option<Arc<dyn Compressor>>
Look up a compressor by name.
Sourcepub fn read_mode_names(&self) -> Vec<String>
pub fn read_mode_names(&self) -> Vec<String>
Registered read-mode names (sorted).
Sourcepub fn compressor_names(&self) -> Vec<String>
pub fn compressor_names(&self) -> Vec<String>
Registered compressor names (sorted).
Sourcepub fn chunker_names(&self) -> Vec<String>
pub fn chunker_names(&self) -> Vec<String>
Registered chunker names (sorted).
Trait Implementations§
Source§impl Default for ExtensionRegistry
impl Default for ExtensionRegistry
Source§fn default() -> ExtensionRegistry
fn default() -> ExtensionRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ExtensionRegistry
impl !UnwindSafe for ExtensionRegistry
impl Freeze for ExtensionRegistry
impl Send for ExtensionRegistry
impl Sync for ExtensionRegistry
impl Unpin for ExtensionRegistry
impl UnsafeUnpin for ExtensionRegistry
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more