LCOV - code coverage report
Current view: top level - pageserver/src/virtual_file/owned_buffers_io/aligned_buffer - alignment.rs (source / functions) Coverage Total Hit
Test: b9d67f908f91f00e353a27440ba89f642a869959.info Lines: 50.0 % 6 3
Test Date: 2024-11-19 21:44:13 Functions: 66.7 % 3 2

            Line data    Source code
       1              : pub trait Alignment: std::marker::Unpin + 'static {
       2              :     /// Returns the required alignments.
       3              :     fn align(&self) -> usize;
       4              : }
       5              : 
       6              : /// Alignment at compile time.
       7              : #[derive(Debug)]
       8              : pub struct ConstAlign<const A: usize>;
       9              : 
      10              : impl<const A: usize> Alignment for ConstAlign<A> {
      11      1998050 :     fn align(&self) -> usize {
      12      1998050 :         A
      13      1998050 :     }
      14              : }
      15              : 
      16              : /// Alignment at run time.
      17              : #[derive(Debug)]
      18              : pub struct RuntimeAlign {
      19              :     align: usize,
      20              : }
      21              : 
      22              : impl Alignment for RuntimeAlign {
      23            0 :     fn align(&self) -> usize {
      24            0 :         self.align
      25            0 :     }
      26              : }
        

Generated by: LCOV version 2.1-beta