orphanage 0.5.6

Random collection of stuff that is still searching for a home.
Documentation
use std::{
  ops::{Deref, DerefMut},
  path::PathBuf
};

#[cfg(feature = "serde")]
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
pub mod serde;

#[cfg(feature = "knus")]
#[cfg_attr(docsrs, doc(cfg(feature = "knus")))]
pub mod knus;


#[derive(Debug, Default, PartialEq, Eq)]
pub struct Count(pub u64);

impl Count {
  #[must_use]
  pub const fn get(&self) -> u64 {
    self.0
  }
}


#[derive(Debug, Default, PartialEq, Eq)]
pub struct BinSize(pub u64);

impl BinSize {
  #[must_use]
  pub const fn get(&self) -> u64 {
    self.0
  }
}


#[derive(Debug, Default, PartialEq, Eq)]
pub struct DecSize(pub u64);

impl DecSize {
  #[must_use]
  pub const fn get(&self) -> u64 {
    self.0
  }
}


#[derive(Clone, Debug, Default, PartialEq, Eq)]
pub struct ExpandedPath(pub PathBuf);

impl ExpandedPath {
  #[must_use]
  pub fn into_inner(self) -> PathBuf {
    self.0
  }
}

impl Deref for ExpandedPath {
  type Target = PathBuf;

  fn deref(&self) -> &Self::Target {
    &self.0
  }
}

impl DerefMut for ExpandedPath {
  fn deref_mut(&mut self) -> &mut Self::Target {
    &mut self.0
  }
}

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