@@ -31,6 +31,7 @@ use crate::policies::host_filter::HostFilter;
3131use crate :: policies:: load_balancing:: { self , RoutingInfo } ;
3232use crate :: policies:: retry:: { RequestInfo , RetryDecision , RetrySession } ;
3333use crate :: policies:: speculative_execution;
34+ use crate :: policies:: timestamp_generator:: TimestampGenerator ;
3435use crate :: prepared_statement:: { PartitionKeyError , PreparedStatement } ;
3536use crate :: query:: Query ;
3637#[ allow( deprecated) ]
@@ -181,6 +182,10 @@ pub struct SessionConfig {
181182 /// Generally, this options is best left as default (false).
182183 pub disallow_shard_aware_port : bool ,
183184
185+ /// Timestamp generator used for generating timestamps on the client-side
186+ /// If None, server-side timestamps are used.
187+ pub timestamp_generator : Option < Arc < dyn TimestampGenerator > > ,
188+
184189 /// If empty, fetch all keyspaces
185190 pub keyspaces_to_fetch : Vec < String > ,
186191
@@ -293,6 +298,7 @@ impl SessionConfig {
293298 connect_timeout : Duration :: from_secs ( 5 ) ,
294299 connection_pool_size : Default :: default ( ) ,
295300 disallow_shard_aware_port : false ,
301+ timestamp_generator : None ,
296302 keyspaces_to_fetch : Vec :: new ( ) ,
297303 fetch_schema_metadata : true ,
298304 keepalive_interval : Some ( Duration :: from_secs ( 30 ) ) ,
0 commit comments