Struct ClientIntentId
pub struct ClientIntentId(/* private fields */);Expand description
Client-generated intent identifier for idempotency.
Uses Uuid::new_v4() (OS entropy) which is non-deterministic at generation
time. Determinism is preserved because:
- Strategies generate IDs at runtime and emit them in
StrategyIntent. - The journal records these IDs verbatim.
- On replay, the reducer reads journaled IDs — it never regenerates them.
state_hash() includes these IDs (via PortfolioState.pending_intents,
seen_intent_ids, etc.), which is correct: given the same journal, the
same IDs appear in the same order, producing the same hash.
Implementations§
§impl ClientIntentId
impl ClientIntentId
pub fn new() -> ClientIntentId
pub fn from_uuid(id: Uuid) -> ClientIntentId
pub fn as_uuid(&self) -> Uuid
Trait Implementations§
§impl Clone for ClientIntentId
impl Clone for ClientIntentId
§fn clone(&self) -> ClientIntentId
fn clone(&self) -> ClientIntentId
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ClientIntentId
impl Debug for ClientIntentId
§impl Default for ClientIntentId
impl Default for ClientIntentId
§fn default() -> ClientIntentId
fn default() -> ClientIntentId
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for ClientIntentId
impl<'de> Deserialize<'de> for ClientIntentId
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ClientIntentId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ClientIntentId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for ClientIntentId
impl Display for ClientIntentId
§impl Hash for ClientIntentId
impl Hash for ClientIntentId
§impl Ord for ClientIntentId
impl Ord for ClientIntentId
§impl PartialEq for ClientIntentId
impl PartialEq for ClientIntentId
§impl PartialOrd for ClientIntentId
impl PartialOrd for ClientIntentId
§impl Serialize for ClientIntentId
impl Serialize for ClientIntentId
§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,
Serialize this value into the given Serde serializer. Read more
impl Copy for ClientIntentId
impl Eq for ClientIntentId
impl StructuralPartialEq for ClientIntentId
Auto Trait Implementations§
impl Freeze for ClientIntentId
impl RefUnwindSafe for ClientIntentId
impl Send for ClientIntentId
impl Sync for ClientIntentId
impl Unpin for ClientIntentId
impl UnsafeUnpin for ClientIntentId
impl UnwindSafe for ClientIntentId
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)