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: b4ae4c4857f9ef3e144e982a35ee23bc84c71983.info Lines: 50.0 % 6 3
Test Date: 2024-10-22 22:13:45 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      1942700 :     fn align(&self) -> usize {
      12      1942700 :         A
      13      1942700 :     }
      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