Skip to main content

routing_key

Function routing_key 

Source
pub fn routing_key(value: &Value) -> Option<u64>
Expand description

Reduce a bound value to a u64 routing key.

Mirrors Rainier ORM’s own (crate-private) rule exactly: a numeric id is taken as-is, because ShardCodec packs the shard into its high bits; a string key is hashed with the ORM’s stable_hash, which is deliberately not std’s randomised hasher so the same key always routes to the same shard across processes and builds.