pub struct SerializedArguments(pub BTreeMap<String, String>);Expand description
Serialized arguments for a task call.
Arguments are stored as a sorted map of key-value pairs where values are JSON-serialized strings. Sorting ensures deterministic hashing for deduplication.
Tuple Fields§
§0: BTreeMap<String, String>Implementations§
Source§impl SerializedArguments
impl SerializedArguments
pub fn new() -> SerializedArguments
pub fn insert(&mut self, key: impl Into<String>, value: impl Into<String>)
Sourcepub fn compute_args_id(&self) -> String
pub fn compute_args_id(&self) -> String
Compute a deterministic hash of the serialized arguments.
Used to generate the args_id component of CallId.
Returns "no_args" for empty argument maps (matches pynenc convention).
Source§impl SerializedArguments
impl SerializedArguments
Sourcepub fn cc_arg_pairs(&self) -> Vec<(String, String)>
pub fn cc_arg_pairs(&self) -> Vec<(String, String)>
Convert arguments into individual (key, value) pairs for per-pair
concurrency-control indexing.
When the argument map is present but empty, a sentinel ("", "") pair
is returned so that Some(empty_args) is distinguishable from None
(which means CC is disabled for this invocation).
Backend implementations should always call this method instead of
manually iterating self.0 to ensure the sentinel convention is
applied consistently.
Source§impl SerializedArguments
impl SerializedArguments
Sourcepub fn cc_key(args: Option<&SerializedArguments>) -> String
pub fn cc_key(args: Option<&SerializedArguments>) -> String
Compute a concurrency control key from optional arguments.
Returns an empty string when args is None or empty,
otherwise returns the deterministic args hash.
Sourcepub fn display(&self, mode: ArgumentPrintMode, truncate_length: usize) -> String
pub fn display(&self, mode: ArgumentPrintMode, truncate_length: usize) -> String
Format arguments for display using the given print mode.
Trait Implementations§
Source§impl Clone for SerializedArguments
impl Clone for SerializedArguments
Source§fn clone(&self) -> SerializedArguments
fn clone(&self) -> SerializedArguments
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SerializedArguments
impl Debug for SerializedArguments
Source§impl Default for SerializedArguments
impl Default for SerializedArguments
Source§fn default() -> SerializedArguments
fn default() -> SerializedArguments
Source§impl<'de> Deserialize<'de> for SerializedArguments
impl<'de> Deserialize<'de> for SerializedArguments
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SerializedArguments, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SerializedArguments, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SerializedArguments
impl PartialEq for SerializedArguments
Source§impl Serialize for SerializedArguments
impl Serialize for SerializedArguments
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for SerializedArguments
impl StructuralPartialEq for SerializedArguments
Auto Trait Implementations§
impl Freeze for SerializedArguments
impl RefUnwindSafe for SerializedArguments
impl Send for SerializedArguments
impl Sync for SerializedArguments
impl Unpin for SerializedArguments
impl UnsafeUnpin for SerializedArguments
impl UnwindSafe for SerializedArguments
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.