Skip to main content

Document

Struct Document 

Source
pub struct Document<'d> { /* private fields */ }
Expand description

Parsed field index that continues to own every original transport segment.

Implementations§

Source§

impl<'d> Document<'d>

Source

pub fn retire(&mut self, budget: &mut usize) -> Poll<()>

Retires field slots and input owners within the remaining work budget.

Source

pub fn release(self) -> Release<'d>

Ends projection and retains the remaining owners for bounded release.

Source

pub fn field(&self, field: usize) -> Result<Option<Value<'_, 'd>>, Error>

Borrows one field and its original input after a single table lookup. A missing field is distinct from an invalid index or a JSON null value.

Source

pub fn u64(&self, field: usize) -> Result<u64, Error>

Source

pub fn raw(&self, field: usize) -> Result<Raw<Shared>, Error>

Source

pub fn project(self, field: usize) -> Project<'d>

Starts a cooperative transfer of one already-validated compound. Selection failures retain the document until budgeted retirement finishes.

Source

pub fn project_at(&mut self, field: usize) -> Result<Option<Project<'d>>, Error>

Selects and projects one compound without repeating its field lookup. A missing field returns None; a present non-compound remains invalid. Rejection preserves this document; only a successful transfer empties it.

Auto Trait Implementations§

§

impl<'d> !RefUnwindSafe for Document<'d>

§

impl<'d> !Send for Document<'d>

§

impl<'d> !Sync for Document<'d>

§

impl<'d> !UnwindSafe for Document<'d>

§

impl<'d> Forget for Document<'d>

§

impl<'d> Freeze for Document<'d>

§

impl<'d> Unpin for Document<'d>

§

impl<'d> UnsafeUnpin for Document<'d>

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> Convert<T> for T

Source§

fn into(self) -> T

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, 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.