LCOV - code coverage report
Current view: top level - src/assembly/x86/operands - immediate.rs (source / functions) Coverage Total Hit
Test: lief.lcov Lines: 0.0 % 11 0
Test Date: 2025-01-11:00:00:00 Functions: 0.0 % 3 0

            Line data    Source code
       1              : use lief_ffi as ffi;
       2              : 
       3              : use crate::common::FromFFI;
       4              : 
       5              : use super::Operand;
       6              : 
       7              : /// This structure represents an immediate operand.
       8              : ///
       9              : /// For instance:
      10              : ///
      11              : /// ```text
      12              : /// mov edi, 1;
      13              : ///          |
      14              : ///          +---> Immediate(1)
      15              : /// ```
      16              : pub struct Immediate {
      17              :     ptr: cxx::UniquePtr<ffi::asm_x86_operands_Immediate>,
      18              : }
      19              : 
      20              : impl FromFFI<ffi::asm_x86_operands_Immediate> for Immediate {
      21            0 :     fn from_ffi(ptr: cxx::UniquePtr<ffi::asm_x86_operands_Immediate>) -> Self {
      22            0 :         Self {
      23            0 :             ptr,
      24            0 :         }
      25            0 :     }
      26              : }
      27              : 
      28              : impl Operand for Immediate {
      29              :     #[doc(hidden)]
      30            0 :     fn as_generic(&self) -> &ffi::asm_x86_Operand {
      31            0 :         self.ptr.as_ref().unwrap().as_ref()
      32            0 :     }
      33              : }
      34              : 
      35              : impl Immediate {
      36              :     /// The constant value wrapped by this operand
      37            0 :     pub fn value(&self) -> i64 {
      38            0 :         self.ptr.value()
      39            0 :     }
      40              : }
        

Generated by: LCOV version 2.1-1