bump-local 0.1.0

A thread-safe bump allocator backed by bumpalo crate.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::fmt;

/// Reset is only allowed when single Bump reference exists
pub struct ResetError;

impl std::error::Error for ResetError {}

impl fmt::Display for ResetError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        f.write_str("reset is only allowed when single Bump reference exists")
    }
}

impl fmt::Debug for ResetError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        <Self as fmt::Display>::fmt(self, f)
    }
}