Skip to main content

qubit_mime/detector/
detection_source.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//! Source available for precise MIME refinement.
11
12use std::path::Path;
13
14/// Source available for precise MIME refinement.
15#[derive(Debug, Clone, Copy)]
16pub enum DetectionSource<'a> {
17    /// No readable source is available.
18    None,
19    /// In-memory content bytes are available.
20    Content(&'a [u8]),
21    /// A local file path is available.
22    Path(&'a Path),
23}