Skip to main content

SelectionBuffers

Struct SelectionBuffers 

Source
pub struct SelectionBuffers<const WANTS: usize, const OBJECTS: usize, const READ: usize, const PARSE: usize> { /* private fields */ }
Expand description

Fixed-capacity backing storage for one independent selected-fetch session. All capacities are explicit const parameters; construction allocates nothing. Keep separate values for overlapping responses. Only the borrowed descriptor reaches the protocol encoder, so applications may also keep their own arrays and construct SelectionStorage directly.

Implementations§

Source§

impl<const WANTS: usize, const OBJECTS: usize, const READ: usize, const PARSE: usize> SelectionBuffers<WANTS, OBJECTS, READ, PARSE>

Source

pub const fn new() -> Self

Source

pub fn storage(&mut self, graph_read_limit: u64) -> SelectionStorage<'_>

Borrow a fresh request descriptor. Traversal resets the work arrays; no clearing or reallocation is needed between successful/failed requests.

Source

pub const fn want_capacity(&self) -> usize

Source

pub const fn object_capacity(&self) -> usize

Source

pub const fn read_capacity(&self) -> usize

Source

pub const fn parse_capacity(&self) -> usize

Source

pub const fn storage_bytes(&self) -> usize

Bytes owned by this value, including metadata and alignment padding.

Trait Implementations§

Source§

impl<const WANTS: usize, const OBJECTS: usize, const READ: usize, const PARSE: usize> Default for SelectionBuffers<WANTS, OBJECTS, READ, PARSE>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<const WANTS: usize, const OBJECTS: usize, const READ: usize, const PARSE: usize> Freeze for SelectionBuffers<WANTS, OBJECTS, READ, PARSE>

§

impl<const WANTS: usize, const OBJECTS: usize, const READ: usize, const PARSE: usize> RefUnwindSafe for SelectionBuffers<WANTS, OBJECTS, READ, PARSE>

§

impl<const WANTS: usize, const OBJECTS: usize, const READ: usize, const PARSE: usize> Send for SelectionBuffers<WANTS, OBJECTS, READ, PARSE>

§

impl<const WANTS: usize, const OBJECTS: usize, const READ: usize, const PARSE: usize> Sync for SelectionBuffers<WANTS, OBJECTS, READ, PARSE>

§

impl<const WANTS: usize, const OBJECTS: usize, const READ: usize, const PARSE: usize> Unpin for SelectionBuffers<WANTS, OBJECTS, READ, PARSE>

§

impl<const WANTS: usize, const OBJECTS: usize, const READ: usize, const PARSE: usize> UnsafeUnpin for SelectionBuffers<WANTS, OBJECTS, READ, PARSE>

§

impl<const WANTS: usize, const OBJECTS: usize, const READ: usize, const PARSE: usize> UnwindSafe for SelectionBuffers<WANTS, OBJECTS, READ, PARSE>

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.