spacetoken 0.1.0

Space allocator that is decoupled from actual storage.
Documentation
use std::fmt;

#[derive(Debug)]
pub enum Error {
  OutOfBounds
}

impl Error {
  #[must_use]
  pub const fn oob() -> Self {
    Self::OutOfBounds
  }
}

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

impl fmt::Display for Error {
  fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    match self {
      Self::OutOfBounds => write!(f, "Size if out of bounds")
    }
  }
}

// vim: set ft=rust et sw=2 ts=2 sts=2 cinoptions=2 tw=79 :