[][src]Enum memur::UploadError

pub enum UploadError {
    DropListDoesNotFit,
    ItemDoesNotFit,
    MetadataDoesNotFit,
    ArenaIsNotAlive,
}

Error while trying to place data in arena block.

Variants

DropListDoesNotFit

Droplist does not fit in a block.

Arena has drop lists to efficiently execute item drop functions, and they hold around 1000 items at minimum.

Solution: increase block size.

ItemDoesNotFit

Item does not fit in a block.

If there is not enough space in a block, then another block is allocated. This error occurs only if the item is bigger than the maximum possible free space in a block.

Solution: handle this error and do not store items that are too big or increase block size.

MetadataDoesNotFit

Metadata does not fit in a block.

Arena stores its metadata in the first block. This metadata contains pointers to first/last droplists, memory block (yeah a bit circular here), weak and total reference counts. This error occurs when this metadata does not fit in a block, and should happen on Arena initialization only.

Solution: increase block size.

ArenaIsNotAlive

Arena was dropped.

The main Arena is dropped and the drop function may have been executed for any containing item. This action is not available.

Solution: ensure arena objects are not accessed after the arena is dropped and handle this error.

Trait Implementations

impl Debug for UploadError[src]

impl Display for UploadError[src]

impl Error for UploadError[src]

impl From<UploadError> for UStrError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.