Skip to main content

SimLog

Struct SimLog 

Source
pub struct SimLog {
    pub wal: Wal<SimDevice>,
    /* private fields */
}
Expand description

The shared log of one simulated machine (log format 3): one write in flight, completed by the world after a random latency.

Fields§

§wal: Wal<SimDevice>

Implementations§

Source§

impl SimLog

Source

pub fn open( m: &MachineRef, shards: u32, segment_bytes: u64, in_flight: usize, spares: usize, offload: Offload, ) -> Result<SimLogRef>

Source

pub fn violation(&self) -> Option<&str>

Two writes in flight shared a block, if they ever did.

Source

pub fn complete_blobs(log: &SimLogRef, m: &MachineRef, id: u64)

The blob writes through job id may sync now, or fail.

Source

pub fn in_flight(&self) -> usize

Writes in flight.

Source

pub fn complete(log: &SimLogRef, m: &MachineRef, seq: u64)

The write seq may sync now, or fail.

Auto Trait Implementations§

§

impl !RefUnwindSafe for SimLog

§

impl !Send for SimLog

§

impl !Sync for SimLog

§

impl !UnwindSafe for SimLog

§

impl Forget for SimLog

§

impl Freeze for SimLog

§

impl Move for SimLog

§

impl Unpin for SimLog

§

impl UnsafeUnpin for SimLog

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.