pub struct ProvisionalBranch {
pub branch_id: String,
pub session_id: String,
pub node_id: String,
pub parent_node_id: String,
pub state: ProvisionalBranchState,
pub parent_seal_hash: Option<[u8; 32]>,
pub sandbox_dir: Option<String>,
pub created_at: i64,
pub updated_at: i64,
}Expand description
PSP-5 Phase 6: Provisional branch tracking speculative child work.
Created before speculative generation begins so the runtime can track branch lifecycle, enforce seal prerequisites, and flush on parent failure.
Fields§
§branch_id: StringUnique branch identifier.
session_id: StringSession this branch belongs to.
node_id: StringThe node executing speculatively in this branch.
parent_node_id: StringParent node whose interface this branch depends on.
state: ProvisionalBranchStateCurrent branch state.
parent_seal_hash: Option<[u8; 32]>SHA-256 hash of the parent interface seal this branch depends on.
None if the parent has not yet produced a seal.
sandbox_dir: Option<String>Sandbox workspace directory (if verification ran in sandbox).
created_at: i64Timestamp of branch creation (epoch seconds).
updated_at: i64Timestamp of last state transition (epoch seconds).
Implementations§
Source§impl ProvisionalBranch
impl ProvisionalBranch
Sourcepub fn new(
branch_id: impl Into<String>,
session_id: impl Into<String>,
node_id: impl Into<String>,
parent_node_id: impl Into<String>,
) -> ProvisionalBranch
pub fn new( branch_id: impl Into<String>, session_id: impl Into<String>, node_id: impl Into<String>, parent_node_id: impl Into<String>, ) -> ProvisionalBranch
Create a new active provisional branch.
Sourcepub fn is_live(&self) -> bool
pub fn is_live(&self) -> bool
Whether this branch is still eligible for merge (active or sealed).
Sourcepub fn is_flushed(&self) -> bool
pub fn is_flushed(&self) -> bool
Whether this branch has been discarded.
Trait Implementations§
Source§impl Clone for ProvisionalBranch
impl Clone for ProvisionalBranch
Source§fn clone(&self) -> ProvisionalBranch
fn clone(&self) -> ProvisionalBranch
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProvisionalBranch
impl Debug for ProvisionalBranch
Source§impl<'de> Deserialize<'de> for ProvisionalBranch
impl<'de> Deserialize<'de> for ProvisionalBranch
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProvisionalBranch, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProvisionalBranch, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ProvisionalBranch
impl Serialize for ProvisionalBranch
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,
Auto Trait Implementations§
impl Freeze for ProvisionalBranch
impl RefUnwindSafe for ProvisionalBranch
impl Send for ProvisionalBranch
impl Sync for ProvisionalBranch
impl Unpin for ProvisionalBranch
impl UnsafeUnpin for ProvisionalBranch
impl UnwindSafe for ProvisionalBranch
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more