pub trait PaxosLike<'a>: Sized {
type PaxosIn: 'a;
type PaxosLog: 'a;
type PaxosOut: 'a;
type Ballot: Clone + Ord + Debug + Serialize + DeserializeOwned;
// Required methods
fn payload_recipients(&self) -> &Cluster<'a, Self::PaxosIn>;
fn log_stores(&self) -> &Cluster<'a, Self::PaxosLog>;
fn get_recipient_from_ballot<L: Location<'a>>(
ballot: Optional<Self::Ballot, L, Unbounded>,
) -> Optional<ClusterId<Self::PaxosIn>, L, Unbounded>;
unsafe fn build<P: PaxosPayload>(
self,
payload_generator: impl FnOnce(Stream<Self::Ballot, Cluster<'a, Self::PaxosIn>, Unbounded>) -> Stream<P, Cluster<'a, Self::PaxosIn>, Unbounded>,
checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>,
) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder>;
// Provided method
unsafe fn with_client<C: 'a, P: PaxosPayload>(
self,
clients: &Cluster<'a, C>,
payloads: Stream<P, Cluster<'a, C>, Unbounded>,
checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>,
) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder> { ... }
}
Required Associated Types§
Sourcetype PaxosOut: 'a
type PaxosOut: 'a
The nodes that output the results of Paxos. Proposers in Paxos, Proxy leaders in Compartmentalized Paxos.
type Ballot: Clone + Ord + Debug + Serialize + DeserializeOwned
Required Methods§
fn payload_recipients(&self) -> &Cluster<'a, Self::PaxosIn>
fn log_stores(&self) -> &Cluster<'a, Self::PaxosLog>
fn get_recipient_from_ballot<L: Location<'a>>( ballot: Optional<Self::Ballot, L, Unbounded>, ) -> Optional<ClusterId<Self::PaxosIn>, L, Unbounded>
Sourceunsafe fn build<P: PaxosPayload>(
self,
payload_generator: impl FnOnce(Stream<Self::Ballot, Cluster<'a, Self::PaxosIn>, Unbounded>) -> Stream<P, Cluster<'a, Self::PaxosIn>, Unbounded>,
checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>,
) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder>
unsafe fn build<P: PaxosPayload>( self, payload_generator: impl FnOnce(Stream<Self::Ballot, Cluster<'a, Self::PaxosIn>, Unbounded>) -> Stream<P, Cluster<'a, Self::PaxosIn>, Unbounded>, checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>, ) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder>
§Safety
During leader-reelection, the latest known leader may be stale, which may result in non-deterministic dropping of payloads.
Provided Methods§
Sourceunsafe fn with_client<C: 'a, P: PaxosPayload>(
self,
clients: &Cluster<'a, C>,
payloads: Stream<P, Cluster<'a, C>, Unbounded>,
checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>,
) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder>
unsafe fn with_client<C: 'a, P: PaxosPayload>( self, clients: &Cluster<'a, C>, payloads: Stream<P, Cluster<'a, C>, Unbounded>, checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>, ) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder>
§Safety
During leader-reelection, the latest known leader may be stale, which may result in non-deterministic dropping of payloads.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.