Skip to main content

SelectResult

Struct SelectResult 

Source
pub struct SelectResult<L> { /* private fields */ }
Expand description

One selected physical byte range coupled to its backend lease.

Implementations§

Source§

impl<L> SelectResult<L>

Source

pub const fn new( start_offset: u64, data: LeasedBytes<L>, cache_state: ReadCacheState, ) -> Self

Creates a selected range from neutral bytes and location metadata.

Source

pub const fn start_offset(&self) -> u64

Returns the physical start offset.

Source

pub fn size(&self) -> usize

Returns the selected byte length.

Source

pub const fn data(&self) -> &LeasedBytes<L>

Returns the leased data.

Source

pub fn into_data(self) -> LeasedBytes<L>

Consumes the selected result and returns its leased data.

Source

pub const fn cache_state(&self) -> ReadCacheState

Returns the neutral cache observation.

Trait Implementations§

Source§

impl<L: Debug> Debug for SelectResult<L>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<L> !Freeze for SelectResult<L>

§

impl<L> RefUnwindSafe for SelectResult<L>

§

impl<L> Send for SelectResult<L>
where LeasedBytes<L>: Send,

§

impl<L> Sync for SelectResult<L>
where LeasedBytes<L>: Sync,

§

impl<L> Unpin for SelectResult<L>
where LeasedBytes<L>: Unpin,

§

impl<L> UnsafeUnpin for SelectResult<L>

§

impl<L> UnwindSafe for SelectResult<L>

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.