hexga_core 0.0.11-beta.56

Basic set of functionalities common to all hexga crate
Documentation
pub trait TryAsRef<T>
{
    type Error;
    fn try_as_ref(&self) -> Result<&T, Self::Error>;
}
impl<T, S> TryAsRef<T> for S
where
    S: AsRef<T>,
{
    type Error = crate::Never;
    fn try_as_ref(&self) -> Result<&T, Self::Error> { Ok(self.as_ref()) }
}

// Todo: add TryAsMut

re_export_items_from_std_or_core!(convert);

pub mod prelude
{
    #[allow(unused)]
    pub use super::traits::*;
    pub use super::{AsMut, AsRef, TryAsRef};
}
pub mod traits
{}
/*
pub trait TryAsMut<T>
{
    type Error: Debug;
    fn try_as_mut(&mut self) -> Result<&mut T,Self::Error>;
}
impl<T,S> TryAsMut<T> for S where S: AsMut<T>
{
    type Error=Never;
    fn try_as_mut(&mut self) -> Result<&mut T,Self::Error> { Ok(self.as_mut()) }
}
*/