ferrum_interfaces/vnext/resource/
lane_stable_identity.rs1use serde::Serialize;
2
3use super::{AllocationLifetime, ExecutionLaneId};
4use crate::vnext::ReusableExecutionBucketId;
5
6#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
7pub struct LaneStableArenaSlotIdentity {
8 lane_id: ExecutionLaneId,
9 lifetime: AllocationLifetime,
10 reusable_execution_bucket_id: ReusableExecutionBucketId,
11 layout_fingerprint: String,
12 slot_id: u64,
13}
14
15impl LaneStableArenaSlotIdentity {
16 pub(super) fn new(
17 lane_id: ExecutionLaneId,
18 lifetime: AllocationLifetime,
19 reusable_execution_bucket_id: ReusableExecutionBucketId,
20 layout_fingerprint: String,
21 slot_id: u64,
22 ) -> Self {
23 Self {
24 lane_id,
25 lifetime,
26 reusable_execution_bucket_id,
27 layout_fingerprint,
28 slot_id,
29 }
30 }
31
32 pub const fn lane_id(&self) -> ExecutionLaneId {
33 self.lane_id
34 }
35
36 pub const fn lifetime(&self) -> AllocationLifetime {
37 self.lifetime
38 }
39
40 pub fn reusable_execution_bucket_id(&self) -> &ReusableExecutionBucketId {
41 &self.reusable_execution_bucket_id
42 }
43
44 pub fn layout_fingerprint(&self) -> &str {
45 &self.layout_fingerprint
46 }
47
48 pub const fn slot_id(&self) -> u64 {
49 self.slot_id
50 }
51}