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: 20b6afc7b7f34578dcaab2b3acdaecfe91cd8bf1.info Lines: 50.0 % 6 3
Test Date: 2024-11-25 17:48:16 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      1996852 :     fn align(&self) -> usize {
      12      1996852 :         A
      13      1996852 :     }
      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