use crate::command::flyweight::Flyweight;
use crate::concurrent::atomic_buffer::AtomicBuffer;
use crate::utils::types::Index;
#[repr(C, packed(4))]
#[derive(Copy, Clone)]
pub(crate) struct OperationSucceededDefn {
correlation_id: i64,
}
pub const OPERATION_SUCCEEDED_LENGTH: Index = std::mem::size_of::<OperationSucceededDefn>() as Index;
pub(crate) struct OperationSucceededFlyweight {
flyweight: Flyweight<OperationSucceededDefn>,
}
impl OperationSucceededFlyweight {
pub fn new(buffer: AtomicBuffer, offset: Index) -> Self {
Self {
flyweight: Flyweight::new(buffer, offset),
}
}
#[inline]
pub fn correlation_id(&self) -> i64 {
unsafe { (*self.flyweight.m_struct).correlation_id }
}
}