Skip to main content

Round

Struct Round 

Source
pub struct Round {
    pub slot_id: u32,
    pub len: usize,
    pub skip: bool,
    pub file_index: u64,
    pub fdata_offset: u64,
    pub chunk_seq: u32,
    /* private fields */
}
Expand description

One unit of work. Borrows bytes inside slot slot_id; valid until the slot is released. Carries everything needed to build a ChunkMeta later.

Fields§

§slot_id: u32§len: usize§skip: bool§file_index: u64§fdata_offset: u64§chunk_seq: u32

Implementations§

Source§

impl Round

Source

pub unsafe fn as_slice<'a>(&self) -> &'a [u8]

Borrow the slice bytes.

Safety: the caller must hold this Round only while its slot is unreleased (i.e. call Ejector::release_one for this slot only after the returned borrow is dropped / the bytes are written).

Trait Implementations§

Auto Trait Implementations§

§

impl !Sync for Round

§

impl Freeze for Round

§

impl RefUnwindSafe for Round

§

impl Unpin for Round

§

impl UnsafeUnpin for Round

§

impl UnwindSafe for Round

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.