Enum linera_views::views::ViewError
source · pub enum ViewError {
Show 15 variants
BcsError(Error),
CannotAcquireCollectionEntry,
IoError(Error),
ArithmeticError(ArithmeticError),
TryLockError(Vec<u8>),
TokioJoinError(JoinError),
StoreError {
backend: String,
error: String,
},
KeyTooLong,
NotFound(String),
InconsistentEntries,
MissingEntries,
PostLoadValuesError,
TooLargeValue,
BlobsNotFound(Vec<BlobId>),
EventsNotFound(Vec<EventId>),
}
Expand description
Main error type for the crate.
Variants§
BcsError(Error)
BCS serialization error.
CannotAcquireCollectionEntry
We failed to acquire an entry in a CollectionView
or a ReentrantCollectionView
.
IoError(Error)
Input output error.
ArithmeticError(ArithmeticError)
Arithmetic error
TryLockError(Vec<u8>)
An error happened while trying to lock.
TokioJoinError(JoinError)
Tokio errors can happen while joining.
StoreError
Errors within the context can occur and are presented as ViewError
.
Fields
KeyTooLong
The key must not be too long
NotFound(String)
The entry does not exist in memory
InconsistentEntries
The database is corrupt: Entries don’t have the expected hash.
MissingEntries
The database is corrupt: Some entries are missing
PostLoadValuesError
The values are incoherent.
TooLargeValue
The value is too large for the client
BlobsNotFound(Vec<BlobId>)
Some blobs were not found.
EventsNotFound(Vec<EventId>)
Some events were not found.
Implementations§
Trait Implementations§
source§impl Error for ViewError
impl Error for ViewError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<ArithmeticError> for ViewError
impl From<ArithmeticError> for ViewError
source§fn from(source: ArithmeticError) -> Self
fn from(source: ArithmeticError) -> Self
Converts to this type from the input type.
source§impl<E: KeyValueStoreError> From<E> for ViewError
impl<E: KeyValueStoreError> From<E> for ViewError
Auto Trait Implementations§
impl Freeze for ViewError
impl !RefUnwindSafe for ViewError
impl Send for ViewError
impl Sync for ViewError
impl Unpin for ViewError
impl !UnwindSafe for ViewError
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoAnyhow for T
impl<T> IntoAnyhow for T
source§fn into_anyhow(self) -> Error
fn into_anyhow(self) -> Error
Converts
self
into an anyhow::Error
.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreCreates a shared type from an unshared type.
source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
source§impl<T> MockResults for T
impl<T> MockResults for T
§type Results = T
type Results = T
The mock native type of the results for the
MockInstance
.source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
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>
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> Upcastable for T
impl<T> Upcastable for T
source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref