Struct WrappedHashableContainerView

Source
pub struct WrappedHashableContainerView<C, W, O> { /* private fields */ }
Expand description

A hash for ContainerView and storing of the hash for memoization purposes

Trait Implementations§

Source§

impl<W, O> ClonableView for WrappedHashableContainerView<W::Context, W, O>

Source§

fn clone_unchecked(&mut self) -> Result<Self, ViewError>

Creates a clone of this view, sharing the underlying storage context but prone to data races which can corrupt the view state.
Source§

impl<C: Debug, W: Debug, O: Debug> Debug for WrappedHashableContainerView<C, W, O>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<C, W, O> Deref for WrappedHashableContainerView<C, W, O>

Source§

type Target = W

The resulting type after dereferencing.
Source§

fn deref(&self) -> &W

Dereferences the value.
Source§

impl<C, W, O> DerefMut for WrappedHashableContainerView<C, W, O>

Source§

fn deref_mut(&mut self) -> &mut W

Mutably dereferences the value.
Source§

impl<W, O> HashableView for WrappedHashableContainerView<W::Context, W, O>
where W: HashableView, O: Serialize + DeserializeOwned + Send + Sync + Copy + PartialEq, W::Hasher: Hasher<Output = O>,

Source§

type Hasher = <W as HashableView>::Hasher

How to compute hashes.
Source§

async fn hash_mut( &mut self, ) -> Result<<Self::Hasher as Hasher>::Output, ViewError>

Computes the hash of the values. Read more
Source§

async fn hash(&self) -> Result<<Self::Hasher as Hasher>::Output, ViewError>

Computes the hash of the values. Read more
Source§

impl<C, W, O> OutputType for WrappedHashableContainerView<C, W, O>
where C: Context, W: OutputType + Send + Sync, O: Send + Sync,

Source§

fn type_name() -> Cow<'static, str>

Type the name.
Source§

fn qualified_type_name() -> String

Qualified typename.
Source§

fn create_type_info(registry: &mut Registry) -> String

Create type information in the registry and return qualified typename.
Source§

async fn resolve( &self, ctx: &ContextSelectionSet<'_>, field: &Positioned<Field>, ) -> ServerResult<Value>

Resolve an output value to async_graphql::Value.
Source§

fn introspection_type_name(&self) -> Cow<'static, str>

Introspection type name Read more
Source§

impl<W, O> View for WrappedHashableContainerView<W::Context, W, O>
where W: HashableView<Hasher: Hasher<Output = O>> + HashableView, O: Serialize + DeserializeOwned + Send + Sync + Copy + PartialEq,

Source§

const NUM_INIT_KEYS: usize

The number of keys used for the initialization
Source§

type Context = <W as View>::Context

The type of context stored in this view
Source§

fn context(&self) -> &Self::Context

Obtains a mutable reference to the internal context.
Source§

fn pre_load(context: &Self::Context) -> Result<Vec<Vec<u8>>, ViewError>

Creates the keys needed for loading the view
Source§

fn post_load( context: Self::Context, values: &[Option<Vec<u8>>], ) -> Result<Self, ViewError>

Loads a view from the values
Source§

async fn load(context: Self::Context) -> Result<Self, ViewError>

Loads a view
Source§

fn rollback(&mut self)

Discards all pending changes. After that flush should have no effect to storage.
Source§

async fn has_pending_changes(&self) -> bool

Returns true if flushing this view would result in changes to the persistent storage.
Source§

fn flush(&mut self, batch: &mut Batch) -> Result<bool, ViewError>

Persists changes to storage. This leaves the view still usable and is essentially neutral to the program running. Crash-resistant storage implementations are expected to accumulate the desired changes in the batch variable first. If the view is dropped without calling flush, staged changes are simply lost. The returned boolean indicates whether the operation removes the view or not.
Source§

fn clear(&mut self)

Clears the view. That can be seen as resetting to default. If the clear is followed by a flush then all the relevant data is removed on the storage.
Source§

fn new(context: Self::Context) -> Result<Self, ViewError>

Builds a trivial view that is already deleted

Auto Trait Implementations§

§

impl<C, W, O> !Freeze for WrappedHashableContainerView<C, W, O>

§

impl<C, W, O> RefUnwindSafe for WrappedHashableContainerView<C, W, O>

§

impl<C, W, O> Send for WrappedHashableContainerView<C, W, O>
where W: Send, C: Send, O: Send,

§

impl<C, W, O> Sync for WrappedHashableContainerView<C, W, O>
where W: Sync, C: Sync, O: Sync + Send,

§

impl<C, W, O> Unpin for WrappedHashableContainerView<C, W, O>
where W: Unpin, C: Unpin, O: Unpin,

§

impl<C, W, O> UnwindSafe for WrappedHashableContainerView<C, W, O>
where W: UnwindSafe, C: UnwindSafe, O: UnwindSafe,

Blanket Implementations§

Source§

impl<T, A, P> Access<T> for P
where A: Access<T> + ?Sized, P: Deref<Target = A>,

Source§

type Guard = <A as Access<T>>::Guard

A guard object containing the value and keeping it alive. Read more
Source§

fn load(&self) -> <P as Access<T>>::Guard

The loading method. Read more
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> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<P> AsEngineRef for P
where P: Deref, <P as Deref>::Target: AsEngineRef,

Source§

fn as_engine_ref(&self) -> EngineRef<'_>

Returns a EngineRef pointing to the underlying context.
Source§

impl<P> AsStoreMut for P
where P: DerefMut, <P as Deref>::Target: AsStoreMut,

Source§

fn as_store_mut(&mut self) -> StoreMut<'_>

Returns a StoreMut pointing to the underlying context.
Source§

fn objects_mut(&mut self) -> &mut StoreObjects

Returns the ObjectMutable
Source§

impl<P> AsStoreRef for P
where P: Deref, <P as Deref>::Target: AsStoreRef,

Source§

fn as_store_ref(&self) -> StoreRef<'_>

Returns a StoreRef pointing to the underlying context.
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<Choices> CoproductSubsetter<CNil, HNil> for Choices

Source§

type Remainder = Choices

Source§

fn subset( self, ) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>

Extract a subset of the possible types in a coproduct (or get the remaining possibilities) Read more
Source§

impl<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

Source§

fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
Source§

impl<T, A> DynAccess<T> for A
where A: Access<T>, <A as Access<T>>::Guard: 'static,

Source§

fn load(&self) -> DynGuard<T>

The equivalent of Access::load.
Source§

impl<To, From> DynInto<To> for From
where From: Into<To>,

Source§

fn into_box(self: Box<From>) -> To

Converts a boxed object into the target type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
Source§

impl<T, U, I> LiftInto<U, I> for T
where U: LiftFrom<T, I>,

Source§

fn lift_into(self) -> U

Performs the indexed conversion.
Source§

impl<T> MockResults for T

Source§

type Results = T

The mock native type of the results for the MockInstance.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The type for metadata in pointers and references to Self.
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<R> Rng for R
where R: RngCore + ?Sized,

Source§

fn random<T>(&mut self) -> T

Return a random value via the StandardUniform distribution. Read more
Source§

fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>

Return an iterator over random variates Read more
Source§

fn random_range<T, R>(&mut self, range: R) -> T
where T: SampleUniform, R: SampleRange<T>,

Generate a random value in the given range. Read more
Source§

fn random_bool(&mut self, p: f64) -> bool

Return a bool with a probability p of being true. Read more
Source§

fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool

Return a bool with a probability of numerator/denominator of being true. Read more
Source§

fn sample<T, D>(&mut self, distr: D) -> T
where D: Distribution<T>,

Sample a new value, using the given distribution. Read more
Source§

fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>
where D: Distribution<T>, Self: Sized,

Create an iterator that generates values using the given distribution. Read more
Source§

fn fill<T>(&mut self, dest: &mut T)
where T: Fill + ?Sized,

Fill any type implementing Fill with random data Read more
Source§

fn gen<T>(&mut self) -> T

👎Deprecated since 0.9.0: Renamed to random to avoid conflict with the new gen keyword in Rust 2024.
Alias for Rng::random.
Source§

fn gen_range<T, R>(&mut self, range: R) -> T
where T: SampleUniform, R: SampleRange<T>,

👎Deprecated since 0.9.0: Renamed to random_range
Source§

fn gen_bool(&mut self, p: f64) -> bool

👎Deprecated since 0.9.0: Renamed to random_bool
Alias for Rng::random_bool.
Source§

fn gen_ratio(&mut self, numerator: u32, denominator: u32) -> bool

👎Deprecated since 0.9.0: Renamed to random_ratio
Source§

impl<T> RngCore for T
where T: DerefMut, <T as Deref>::Target: RngCore,

Source§

fn next_u32(&mut self) -> u32

Return the next random u32. Read more
Source§

fn next_u64(&mut self) -> u64

Return the next random u64. Read more
Source§

fn fill_bytes(&mut self, dst: &mut [u8])

Fill dest with random data. Read more
Source§

impl<M, I> RuntimeMemory<&mut I> for M
where M: RuntimeMemory<I>,

Source§

fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>

Reads length bytes from memory from the provided location.

Source§

fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>

Writes the bytes to memory at the provided location.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<Source> Sculptor<HNil, HNil> for Source

Source§

type Remainder = Source

Source§

fn sculpt(self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)

Consumes the current HList and returns an HList with the requested shape. Read more
Source§

impl<AnyTail> Split<HNil> for AnyTail

Source§

type Remainder = AnyTail

The tail of remaining elements after splitting up the list.
Source§

fn split(self) -> (HNil, <AnyTail as Split<HNil>>::Remainder)

Splits the current heterogeneous list in two.
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.
Source§

impl<R> TryRngCore for R
where R: RngCore + ?Sized,

Source§

type Error = Infallible

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

fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>

Return the next random u32.
Source§

fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>

Return the next random u64.
Source§

fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>

Fill dest entirely with random data.
Source§

fn unwrap_err(self) -> UnwrapErr<Self>
where Self: Sized,

Wrap RNG with the UnwrapErr wrapper.
Source§

fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>

Wrap RNG with the UnwrapMut wrapper.
Source§

fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>
where Self: Sized,

Convert an RngCore to a RngReadAdapter.
Source§

impl<T> Upcastable for T
where T: Any + Send + Sync + 'static,

Source§

fn upcast_any_ref(&self) -> &(dyn Any + 'static)

upcast ref
Source§

fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)

upcast mut ref
Source§

fn upcast_any_box(self: Box<T>) -> Box<dyn Any>

upcast boxed dyn
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> CryptoRng for T
where T: DerefMut, <T as Deref>::Target: CryptoRng,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> Formattable for T
where T: Deref, <T as Deref>::Target: Formattable,

Source§

impl<T> Parsable for T
where T: Deref, <T as Deref>::Target: Parsable,

Source§

impl<T> Post for T
where T: Send + Sync,

Source§

impl<R> TryCryptoRng for R
where R: CryptoRng + ?Sized,