#! [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)
}
}