README

mokomoking2501/lockwire/core does not have a README file

#
Endpoint

pub(open) trait Endpoint {
fn on_rx(Self, RxEvent) -> Unit
fn on_tick(Self, VTime) -> Unit
}

#
Medium

pub(open) trait Medium {
fn submit(Self, TxEvent) -> Array[RxEvent] raise TransportError
fn lookahead(Self) -> Duration
}

#
PointToPointMedium

pub(open) trait PointToPointMedium : Medium {
fn bind(Self, EndpointId, EndpointId) -> Unit
}

#
Reactor

pub(open) trait Reactor {
fn now(Self) -> VTime
fn schedule(Self, TxEvent) -> Unit raise TransportError
fn run(Self) -> SimDigest raise TransportError
}

#
TransportError

pub(all) suberror TransportError {
LinkDown
InvalidFrame(String)
UnboundEndpoint(EndpointId)
} derive(
Debug
)

#
BackendProfile

pub(all) enum BackendProfile {
SimNative
SimWasm
Replay
RealLinux
RealEmbedded
} derive(Eq,
Debug
)

#
BackendProfile::is_deterministic

fn BackendProfile::is_deterministic(profile : BackendProfile) -> Bool

#
Channel

pub(all) struct Channel {
id : ChannelId
next_seq : Int
} derive(Eq,
Debug
)

#
Channel::new

fn Channel::new(id~ : ChannelId) -> Channel

#
Channel::reserve

fn Channel::reserve(self : Channel) -> (Channel, Int)

#
ChannelId

pub(all) enum ChannelId {
ChannelId(Int)
} derive(Compare, Eq,
Debug
)

#
ChannelId::value

fn ChannelId::value(self : ChannelId) -> Int

#
Duration

pub(all) enum Duration {
Duration(Int64)
} derive(Compare, Eq,
Debug
)

#
Duration::from_ns

fn Duration::from_ns(ns : Int64) -> Duration

#
Duration::ns

fn Duration::ns(self : Duration) -> Int64

#
EndpointId

pub(all) enum EndpointId {
EndpointId(Int)
} derive(Compare, Eq,
Debug
)

#
EndpointId::value

fn EndpointId::value(self : EndpointId) -> Int

#
Frame

pub(all) struct Frame {
id : Int
payload : Bytes
state : FrameState
} derive(Eq,
Debug
)

#
Frame::acquire

fn Frame::acquire(id~ : Int) -> Frame

#
Frame::filled

fn Frame::filled(self : Frame, payload~ : Bytes) -> Frame

#
Frame::received

fn Frame::received(self : Frame) -> Frame

#
Frame::receiving

fn Frame::receiving(self : Frame) -> Frame

#
Frame::released

fn Frame::released(self : Frame) -> Frame

#
Frame::sending

fn Frame::sending(self : Frame) -> Frame

#
Frame::sent

fn Frame::sent(self : Frame) -> Frame

#
FrameState

pub(all) enum FrameState {
Free
Acquired
Filled
Sending
Sent
Receiving
Received
Released
} derive(Eq,
Debug
)

#
LinearizationKey

pub(all) struct LinearizationKey {
vtime : VTime
channel_id : ChannelId
seq : Int
parent_sort : Int
event_id : Int
} derive(Compare, Eq,
Debug
)

#
MvpStage

pub(all) enum MvpStage {
M0Skeleton
M1CoreP2p
M2ScenarioEvent
M3TraceReplay
M4FaultResource
M5NativeWasmDiff
M6SegmentToy
M7Packaging
} derive(Eq,
Debug
)

#
PortId

pub(all) enum PortId {
PortId(Int)
} derive(Compare, Eq,
Debug
)

#
RxEvent

pub(all) struct RxEvent {
id : Int
parent_id : Int
vtime : VTime
channel_id : ChannelId
seq : Int
source : EndpointId
target : EndpointId
frame : Frame
} derive(Eq,
Debug
)

#
SimDigest

pub(all) struct SimDigest {
state_digest : Int64
rng_steps : Int
event_count : Int
} derive(Eq,
Debug
)

#
SimDigest::empty

fn SimDigest::empty(seed~ : Int) -> SimDigest

#
SimDigest::mix

fn SimDigest::mix(self : SimDigest, value : Int) -> SimDigest

#
SimDigest::step_rng

fn SimDigest::step_rng(self : SimDigest) -> SimDigest

#
TxEvent

pub(all) struct TxEvent {
id : Int
parent_id : Int?
vtime : VTime
channel_id : ChannelId
seq : Int
source : EndpointId
target : EndpointId
frame : Frame
} derive(Eq,
Debug
)

#
TxEvent::linearization_key

fn TxEvent::linearization_key(self : TxEvent) -> LinearizationKey

#
TxEvent::make

fn TxEvent::make(id~ : Int, parent_id? : Int, vtime~ : VTime, channel_id~ : ChannelId, seq~ : Int, source~ : EndpointId, target~ : EndpointId, frame~ : Frame) -> TxEvent

#
VTime

pub(all) enum VTime {
VTime(Int64)
} derive(Compare, Eq,
Debug
)

#
VTime::add

fn VTime::add(self : VTime, delta : Duration) -> VTime

#
VTime::from_ns

fn VTime::from_ns(ns : Int64) -> VTime

#
VTime::ns

fn VTime::ns(self : VTime) -> Int64

#
backend_profile_label

fn backend_profile_label(profile : BackendProfile) -> String

#
backend_profiles

fn backend_profiles() -> Array[BackendProfile]

#
check_rx_invariants

fn check_rx_invariants(events : ArrayView[RxEvent]) -> Bool

#
mvp_stage_label

fn mvp_stage_label(stage : MvpStage) -> String

#
mvp_stages

fn mvp_stages() -> Array[MvpStage]

#
package_id

fn package_id() -> String

#
rx_event_precedes

fn rx_event_precedes(left : RxEvent, right : RxEvent) -> Bool

#
tx_event_precedes

fn tx_event_precedes(left : TxEvent, right : TxEvent) -> Bool

Source Files