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: 49aa928ec5b4b510172d8b5c6d154da28e70a46c.info Lines: 50.0 % 6 3
Test Date: 2024-11-13 18:23:39 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      1996752 :     fn align(&self) -> usize {
      12      1996752 :         A
      13      1996752 :     }
      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