liminal-protocol 0.14.0

Shared participant-lifecycle protocol types for liminal
Documentation
//! The client crate-tests' constructor for a terminalized detach cell. It
//! lives beside `response.rs`, not in it, so the SDK's wasm crate (which
//! compiles `wire/` without `client/`) sees a public test-support item rather
//! than a crate-private one nothing in that crate calls.

use super::{
    BindingEpoch, BindingStateView, ConversationId, DetachAttemptToken, Generation, ParticipantId,
    TerminalizedDetachCell,
};

impl TerminalizedDetachCell {
    /// Builds the cell from its parts for the client tests' resume and replay
    /// cases.
    #[must_use]
    pub const fn for_client_test(
        conversation_id: ConversationId,
        participant_id: ParticipantId,
        capability_generation: Generation,
        detach_attempt_token: DetachAttemptToken,
        current_generation: Generation,
        committed_binding_epoch: BindingEpoch,
        binding_state: BindingStateView,
    ) -> Self {
        Self {
            conversation_id,
            participant_id,
            capability_generation,
            detach_attempt_token,
            current_generation,
            committed_binding_epoch,
            binding_state,
        }
    }
}