• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

facet-rs / facet / 19992174439

06 Dec 2025 05:56PM UTC coverage: 58.742% (-0.005%) from 58.747%
19992174439

Pull #1118

github

web-flow
Merge d1d251ac8 into 45a8cb1c3
Pull Request #1118: Reduce/cordon bloat in facet, introduce bloatbench

1138 of 3103 new or added lines in 61 files covered. (36.67%)

540 existing lines in 30 files now uncovered.

24225 of 41240 relevant lines covered (58.74%)

502.5 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/facet-core/src/types/def/function.rs
1
use crate::Shape;
2

3
/// Common fields for function pointer types
4
#[derive(Clone, Copy, Debug)]
5
#[repr(C)]
6
pub struct FunctionPointerDef {
7
    /// The calling abi of the function pointer
8
    pub abi: FunctionAbi,
9

10
    /// All parameter types, in declaration order
11
    pub parameters: &'static [&'static Shape],
12

13
    /// The return type
14
    pub return_type: &'static Shape,
15
}
16

17
/// The calling ABI of a function pointer
18
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Default)]
19
#[repr(C)]
20
pub enum FunctionAbi {
21
    /// C ABI
22
    C,
23

24
    /// Rust ABI
25
    #[default]
26
    Rust,
27

28
    /// An unknown ABI
29
    Unknown,
30
}
31
impl FunctionAbi {
32
    /// Returns the string in `extern "abi-string"` if not [`FunctionAbi::Unknown`].
33
    pub fn as_abi_str(&self) -> Option<&str> {
×
34
        match self {
×
35
            FunctionAbi::C => Some("C"),
×
36
            FunctionAbi::Rust => Some("Rust"),
×
37
            FunctionAbi::Unknown => None,
×
38
        }
39
    }
×
40
}
41

42
impl FunctionPointerDef {
43
    /// Construct a `FunctionPointerDef` from its components.
NEW
44
    pub const fn new(
×
NEW
45
        abi: FunctionAbi,
×
NEW
46
        parameters: &'static [&'static Shape],
×
NEW
47
        return_type: &'static Shape,
×
NEW
48
    ) -> Self {
×
49
        Self {
×
NEW
50
            abi,
×
NEW
51
            parameters,
×
NEW
52
            return_type,
×
53
        }
×
54
    }
×
55
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc