Importer

Struct Importer 

Source
pub struct Importer<'a, R, U> { /* private fields */ }

Implementations§

Source§

impl<'a, R, U> Importer<'a, R, U>

Source

pub fn new(resolver: R, updater: &'a mut U) -> Self

Source§

impl<'a, R: Resolve, U> Importer<'a, R, U>

Source

pub fn finish(self) -> ImporterMap<R>

Trait Implementations§

Source§

impl<'a, R: Resolve, U: Updater> Cloner for Importer<'a, R, U>

Source§

fn clone_ref<T: DeepClone + Object + DataSize + ObjectWrite>( &mut self, old: Ref<T>, ) -> Result<Ref<T>>

Source§

fn clone_plainref(&mut self, old: PlainRef) -> Result<PlainRef>

Source§

fn clone_rcref<T: DeepClone + ObjectWrite + DataSize>( &mut self, old: &RcRef<T>, ) -> Result<RcRef<T>>

Source§

fn clone_shared<T: DeepClone>(&mut self, old: &Shared<T>) -> Result<Shared<T>>

Source§

impl<'a, R: Resolve, U> Resolve for Importer<'a, R, U>

Source§

fn get<T: Object + DataSize>(&self, r: Ref<T>) -> Result<RcRef<T>>

Source§

fn get_data_or_decode( &self, id: PlainRef, range: Range<usize>, filters: &[StreamFilter], ) -> Result<Arc<[u8]>>

Source§

fn options(&self) -> &ParseOptions

Source§

fn resolve(&self, r: PlainRef) -> Result<Primitive>

Source§

fn resolve_flags( &self, r: PlainRef, flags: ParseFlags, depth: usize, ) -> Result<Primitive>

Source§

fn stream_data(&self, id: PlainRef, range: Range<usize>) -> Result<Arc<[u8]>>

Source§

impl<'a, R, U: Updater> Updater for Importer<'a, R, U>

Source§

fn create<T: ObjectWrite>(&mut self, obj: T) -> Result<RcRef<T>>

Source§

fn fulfill<T: ObjectWrite>( &mut self, promise: PromisedRef<T>, obj: T, ) -> Result<RcRef<T>>

Source§

fn promise<T: Object>(&mut self) -> PromisedRef<T>

Source§

fn update<T: ObjectWrite>(&mut self, old: PlainRef, obj: T) -> Result<RcRef<T>>

Auto Trait Implementations§

§

impl<'a, R, U> Freeze for Importer<'a, R, U>
where R: Freeze,

§

impl<'a, R, U> !RefUnwindSafe for Importer<'a, R, U>

§

impl<'a, R, U> Send for Importer<'a, R, U>
where R: Send, U: Send,

§

impl<'a, R, U> Sync for Importer<'a, R, U>
where R: Sync, U: Sync,

§

impl<'a, R, U> Unpin for Importer<'a, R, U>
where R: Unpin,

§

impl<'a, R, U> !UnwindSafe for Importer<'a, R, U>

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

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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 = 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.