Skip to main content

qubit_mime/detector/
mime_detector_spec.rs

1/*******************************************************************************
2 *
3 *    Copyright (c) 2026 Haixing Hu.
4 *
5 *    SPDX-License-Identifier: Apache-2.0
6 *
7 *    Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10//! Service specification for pluggable MIME detector providers.
11
12use qubit_spi::ServiceSpec;
13
14use crate::{
15    MimeConfig,
16    MimeDetector,
17};
18
19/// Service specification for pluggable MIME detector providers.
20///
21/// The configuration is [`MimeConfig`], and created services implement the
22/// [`MimeDetector`] trait object.
23#[derive(Debug)]
24pub struct MimeDetectorSpec;
25
26impl ServiceSpec for MimeDetectorSpec {
27    type Config = MimeConfig;
28    type Service = dyn MimeDetector;
29}