revm_interpreter/interpreter/
return_data.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::interpreter::ReturnData;
use primitives::Bytes;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Clone, Debug, Default)]
pub struct ReturnDataImpl(Bytes);

impl ReturnData for ReturnDataImpl {
    fn buffer(&self) -> &[u8] {
        self.0.as_ref()
    }

    fn buffer_mut(&mut self) -> &mut Bytes {
        &mut self.0
    }
}