1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#! [allow(unused_imports)] use std :: sync :: Arc ; use std :: cell :: RefCell
; use object_lib :: { self, Persistable, MaterializedObjectVersion } ; use
object_lib :: tls :: ObjectMapping ; use nando_support ; use logging ; use
nando_support ::
{
    activation_intent :: NandoResult, log_entry, resolve_object,
    bump_if_changed
} ; use :: sample_programs :: kvs :: StorageBucket ; use :: sample_programs ::
kvs :: put ; use :: sample_programs :: kvs :: get ; use :: sample_programs ::
pstructs :: SmallStruct ; use :: sample_programs :: pstructs :: set_key ; use
:: sample_programs :: pstructs :: get_key ; use :: sample_programs :: pstructs
:: add_elem ; use :: sample_programs :: pstructs :: print_elems ; use ::
sample_programs :: pstructs :: SomeMap ; use :: sample_programs ::
set_difference :: SlowSet ; pub trait NandoManager
{
    fn put_nando < V : Persistable + Copy + std :: fmt :: Debug >
    (ctx : & execution_definitions :: txn_context :: TxnContext,
    object_arg_mappings : & Vec < object_lib :: tls :: ObjectMapping >,
    log_entry : std :: sync :: Arc < std :: cell :: RefCell < nando_support ::
    log_entry :: TransactionLogEntry > >, bucket : & mut StorageBucket < V >,
    key : String, value : V,) ; fn get_nando < V : Persistable + Copy +
    'static >
    (ctx : & execution_definitions :: txn_context :: TxnContext,
    object_arg_mappings : & Vec < object_lib :: tls :: ObjectMapping >,
    log_entry : std :: sync :: Arc < std :: cell :: RefCell < nando_support ::
    log_entry :: TransactionLogEntry > >, bucket : & StorageBucket < V >, key
    : String,) -> Option < V > ; fn
    set_key_nando(ctx : & execution_definitions :: txn_context :: TxnContext,
    object_arg_mappings : & Vec < object_lib :: tls :: ObjectMapping >,
    log_entry : std :: sync :: Arc < std :: cell :: RefCell < nando_support ::
    log_entry :: TransactionLogEntry > >, v : & mut SmallStruct, k : u64,) ;
    fn
    get_key_nando(ctx : & execution_definitions :: txn_context :: TxnContext,
    object_arg_mappings : & Vec < object_lib :: tls :: ObjectMapping >,
    log_entry : std :: sync :: Arc < std :: cell :: RefCell < nando_support ::
    log_entry :: TransactionLogEntry > >, v : & SmallStruct,) -> u64 ; fn
    add_elem_nando(ctx : & execution_definitions :: txn_context :: TxnContext,
    object_arg_mappings : & Vec < object_lib :: tls :: ObjectMapping >,
    log_entry : std :: sync :: Arc < std :: cell :: RefCell < nando_support ::
    log_entry :: TransactionLogEntry > >, v : & mut SmallStruct, e : u64,) ;
    fn
    print_elems_nando(ctx : & execution_definitions :: txn_context ::
    TxnContext, object_arg_mappings : & Vec < object_lib :: tls ::
    ObjectMapping >, log_entry : std :: sync :: Arc < std :: cell :: RefCell <
    nando_support :: log_entry :: TransactionLogEntry > >, v : & SmallStruct,)
    ;
} #[automatically_derived] #[allow(unused_mut)] impl NandoManager for crate ::
NandoManagerBase
{
    fn put_nando < V : Persistable + Copy + std :: fmt :: Debug >
    (ctx : & execution_definitions :: txn_context :: TxnContext,
    object_arg_mappings : & Vec < object_lib :: tls :: ObjectMapping >,
    log_entry : std :: sync :: Arc < std :: cell :: RefCell < nando_support ::
    log_entry :: TransactionLogEntry > >, bucket : & mut StorageBucket < V >,
    key : String, value : V,)
    {
        object_lib :: tls :: init_txn_context() ; object_lib :: tls ::
        set_txn_meta(ctx.get_log_entry(), object_arg_mappings, ctx.get_ecb())
        ; object_lib :: tls :: set_current_namespace(ctx.get_namespace()) ;
        object_tracker :: object_tracker_tls ::
        set_thread_local_object_tracker(ctx.get_object_tracker()) ;
        ownership_tracker :: ownership_tracker_tls ::
        set_thread_local_ownership_tracker(ctx.get_ownership_tracker()) ; put
        :: < V > (bucket, key, value)
    } fn get_nando < V : Persistable + Copy + 'static >
    (ctx : & execution_definitions :: txn_context :: TxnContext,
    object_arg_mappings : & Vec < object_lib :: tls :: ObjectMapping >,
    log_entry : std :: sync :: Arc < std :: cell :: RefCell < nando_support ::
    log_entry :: TransactionLogEntry > >, bucket : & StorageBucket < V >, key
    : String,) -> Option < V >
    {
        object_lib :: tls :: init_txn_context() ; object_lib :: tls ::
        set_txn_meta(ctx.get_log_entry(), object_arg_mappings, ctx.get_ecb())
        ; object_lib :: tls :: set_current_namespace(ctx.get_namespace()) ;
        object_tracker :: object_tracker_tls ::
        set_thread_local_object_tracker(ctx.get_object_tracker()) ;
        ownership_tracker :: ownership_tracker_tls ::
        set_thread_local_ownership_tracker(ctx.get_ownership_tracker()) ; get
        :: < V > (bucket, key)
    } fn
    set_key_nando(ctx : & execution_definitions :: txn_context :: TxnContext,
    object_arg_mappings : & Vec < object_lib :: tls :: ObjectMapping >,
    log_entry : std :: sync :: Arc < std :: cell :: RefCell < nando_support ::
    log_entry :: TransactionLogEntry > >, v : & mut SmallStruct, k : u64,)
    {
        object_lib :: tls :: init_txn_context() ; object_lib :: tls ::
        set_txn_meta(ctx.get_log_entry(), object_arg_mappings, ctx.get_ecb())
        ; object_lib :: tls :: set_current_namespace(ctx.get_namespace()) ;
        object_tracker :: object_tracker_tls ::
        set_thread_local_object_tracker(ctx.get_object_tracker()) ;
        ownership_tracker :: ownership_tracker_tls ::
        set_thread_local_ownership_tracker(ctx.get_ownership_tracker()) ;
        set_key(v, k)
    } fn
    get_key_nando(ctx : & execution_definitions :: txn_context :: TxnContext,
    object_arg_mappings : & Vec < object_lib :: tls :: ObjectMapping >,
    log_entry : std :: sync :: Arc < std :: cell :: RefCell < nando_support ::
    log_entry :: TransactionLogEntry > >, v : & SmallStruct,) -> u64
    {
        object_lib :: tls :: init_txn_context() ; object_lib :: tls ::
        set_txn_meta(ctx.get_log_entry(), object_arg_mappings, ctx.get_ecb())
        ; object_lib :: tls :: set_current_namespace(ctx.get_namespace()) ;
        object_tracker :: object_tracker_tls ::
        set_thread_local_object_tracker(ctx.get_object_tracker()) ;
        ownership_tracker :: ownership_tracker_tls ::
        set_thread_local_ownership_tracker(ctx.get_ownership_tracker()) ;
        get_key(v)
    } fn
    add_elem_nando(ctx : & execution_definitions :: txn_context :: TxnContext,
    object_arg_mappings : & Vec < object_lib :: tls :: ObjectMapping >,
    log_entry : std :: sync :: Arc < std :: cell :: RefCell < nando_support ::
    log_entry :: TransactionLogEntry > >, v : & mut SmallStruct, e : u64,)
    {
        object_lib :: tls :: init_txn_context() ; object_lib :: tls ::
        set_txn_meta(ctx.get_log_entry(), object_arg_mappings, ctx.get_ecb())
        ; object_lib :: tls :: set_current_namespace(ctx.get_namespace()) ;
        object_tracker :: object_tracker_tls ::
        set_thread_local_object_tracker(ctx.get_object_tracker()) ;
        ownership_tracker :: ownership_tracker_tls ::
        set_thread_local_ownership_tracker(ctx.get_ownership_tracker()) ;
        add_elem(v, e)
    } fn
    print_elems_nando(ctx : & execution_definitions :: txn_context ::
    TxnContext, object_arg_mappings : & Vec < object_lib :: tls ::
    ObjectMapping >, log_entry : std :: sync :: Arc < std :: cell :: RefCell <
    nando_support :: log_entry :: TransactionLogEntry > >, v : & SmallStruct,)
    {
        object_lib :: tls :: init_txn_context() ; object_lib :: tls ::
        set_txn_meta(ctx.get_log_entry(), object_arg_mappings, ctx.get_ecb())
        ; object_lib :: tls :: set_current_namespace(ctx.get_namespace()) ;
        object_tracker :: object_tracker_tls ::
        set_thread_local_object_tracker(ctx.get_object_tracker()) ;
        ownership_tracker :: ownership_tracker_tls ::
        set_thread_local_ownership_tracker(ctx.get_ownership_tracker()) ;
        print_elems(v)
    }
}