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: 8b13a09a5c233d98abd4a0d3e59157e7db16d6fd.info Lines: 50.0 % 6 3
Test Date: 2024-11-21 10:53:51 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      1997026 :     fn align(&self) -> usize {
      12      1997026 :         A
      13      1997026 :     }
      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