use std::collections::{HashMap, HashSet, BTreeMap, BTreeSet, VecDeque, LinkedList};
use std::rc::Rc;
use std::sync::Arc;
use crate::{Position, DaemonicError};
use super::{Glass, Severity, GlassStable, GlassCracked};
impl Glass<u8> for u8 {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::u8");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&u8> {
Some(self)
}
fn into_payload(self) -> Option<u8> {
Some(self)
}
}
impl GlassStable<u8> for u8 {
fn value(&self) -> &u8 {
self
}
fn into_value(self) -> u8 {
self
}
}
impl Glass<u16> for u16 {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::u16");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&u16> {
Some(self)
}
fn into_payload(self) -> Option<u16> {
Some(self)
}
}
impl GlassStable<u16> for u16 {
fn value(&self) -> &u16 {
self
}
fn into_value(self) -> u16 {
self
}
}
impl Glass<u32> for u32 {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::u32");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&u32> {
Some(self)
}
fn into_payload(self) -> Option<u32> {
Some(self)
}
}
impl GlassStable<u32> for u32 {
fn value(&self) -> &u32 {
self
}
fn into_value(self) -> u32 {
self
}
}
impl Glass<u64> for u64 {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::u64");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&u64> {
Some(self)
}
fn into_payload(self) -> Option<u64> {
Some(self)
}
}
impl GlassStable<u64> for u64 {
fn value(&self) -> &u64 {
self
}
fn into_value(self) -> u64 {
self
}
}
impl Glass<u128> for u128 {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::u128");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&u128> {
Some(self)
}
fn into_payload(self) -> Option<u128> {
Some(self)
}
}
impl GlassStable<u128> for u128 {
fn value(&self) -> &u128 {
self
}
fn into_value(self) -> u128 {
self
}
}
impl Glass<usize> for usize {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::usize");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&usize> {
Some(self)
}
fn into_payload(self) -> Option<usize> {
Some(self)
}
}
impl GlassStable<usize> for usize {
fn value(&self) -> &usize {
self
}
fn into_value(self) -> usize {
self
}
}
impl Glass<i8> for i8 {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::i8");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&i8> {
Some(self)
}
fn into_payload(self) -> Option<i8> {
Some(self)
}
}
impl GlassStable<i8> for i8 {
fn value(&self) -> &i8 {
self
}
fn into_value(self) -> i8 {
self
}
}
impl Glass<i16> for i16 {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::i16");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&i16> {
Some(self)
}
fn into_payload(self) -> Option<i16> {
Some(self)
}
}
impl GlassStable<i16> for i16 {
fn value(&self) -> &i16 {
self
}
fn into_value(self) -> i16 {
self
}
}
impl Glass<i32> for i32 {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::i32");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&i32> {
Some(self)
}
fn into_payload(self) -> Option<i32> {
Some(self)
}
}
impl GlassStable<i32> for i32 {
fn value(&self) -> &i32 {
self
}
fn into_value(self) -> i32 {
self
}
}
impl Glass<i64> for i64 {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::i64");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&i64> {
Some(self)
}
fn into_payload(self) -> Option<i64> {
Some(self)
}
}
impl GlassStable<i64> for i64 {
fn value(&self) -> &i64 {
self
}
fn into_value(self) -> i64 {
self
}
}
impl Glass<i128> for i128 {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::i128");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&i128> {
Some(self)
}
fn into_payload(self) -> Option<i128> {
Some(self)
}
}
impl GlassStable<i128> for i128 {
fn value(&self) -> &i128 {
self
}
fn into_value(self) -> i128 {
self
}
}
impl Glass<isize> for isize {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::isize");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&isize> {
Some(self)
}
fn into_payload(self) -> Option<isize> {
Some(self)
}
}
impl GlassStable<isize> for isize {
fn value(&self) -> &isize {
self
}
fn into_value(self) -> isize {
self
}
}
impl Glass<f32> for f32 {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::f32");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&f32> {
Some(self)
}
fn into_payload(self) -> Option<f32> {
Some(self)
}
}
impl GlassStable<f32> for f32 {
fn value(&self) -> &f32 {
self
}
fn into_value(self) -> f32 {
self
}
}
impl Glass<f64> for f64 {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::f64");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&f64> {
Some(self)
}
fn into_payload(self) -> Option<f64> {
Some(self)
}
}
impl GlassStable<f64> for f64 {
fn value(&self) -> &f64 {
self
}
fn into_value(self) -> f64 {
self
}
}
impl Glass<bool> for bool {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::bool");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&bool> {
Some(self)
}
fn into_payload(self) -> Option<bool> {
Some(self)
}
}
impl GlassStable<bool> for bool {
fn value(&self) -> &bool {
self
}
fn into_value(self) -> bool {
self
}
}
impl Glass<char> for char {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::char");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&char> {
Some(self)
}
fn into_payload(self) -> Option<char> {
Some(self)
}
}
impl GlassStable<char> for char {
fn value(&self) -> &char {
self
}
fn into_value(self) -> char {
self
}
}
impl Glass<str> for str {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::str");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&str> {
Some(self)
}
fn into_payload(self) -> Option<str> {
Some(self)
}
}
impl GlassStable<str> for str {
fn value(&self) -> &str {
self
}
fn into_value(self) -> str {
self
}
}
impl Glass<String> for String {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::primitives::String");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&String> {
Some(self)
}
fn into_payload(self) -> Option<String> {
Some(self)
}
}
impl GlassStable<String> for String {
fn value(&self) -> &String {
self
}
fn into_value(self) -> String {
self
}
}
impl<T> Glass<Vec<T>> for Vec<T>
where
T: Glass<T>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::containers::Vec");
&POS
}
fn severity(&self) -> Severity {
if self.is_empty() {
Severity::Cracked
} else {
Severity::Stable
}
}
fn payload(&self) -> Option<&Vec<T>> {
Some(self)
}
fn into_payload(self) -> Option<Vec<T>> {
Some(self)
}
}
impl<T> GlassStable<Vec<T>> for Vec<T>
where
T: Glass<T>,
Self: Glass<Vec<T>>,
{
fn value(&self) -> &Vec<T> {
self
}
fn into_value(self) -> Vec<T> {
self
}
}
impl<T> GlassCracked<Vec<T>> for Vec<T>
where
T: Glass<T>,
Self: Glass<Vec<T>>,
{
fn is_holding(&self) -> bool {
!self.is_empty()
}
fn repair(&self) -> Option<&dyn Fn(&Vec<T>) -> bool> {
None }
}
impl<T> Glass<VecDeque<T>> for VecDeque<T>
where
T: Glass<T>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::containers::VecDeque");
&POS
}
fn severity(&self) -> Severity {
if self.is_empty() {
Severity::Cracked
} else {
Severity::Stable
}
}
fn payload(&self) -> Option<&VecDeque<T>> {
Some(self)
}
fn into_payload(self) -> Option<VecDeque<T>> {
Some(self)
}
}
impl<T> GlassStable<VecDeque<T>> for VecDeque<T>
where
T: Glass<T>,
Self: Glass<VecDeque<T>>,
{
fn value(&self) -> &VecDeque<T> {
self
}
fn into_value(self) -> VecDeque<T> {
self
}
}
impl<T> GlassCracked<VecDeque<T>> for VecDeque<T>
where
T: Glass<T>,
Self: Glass<VecDeque<T>>,
{
fn is_holding(&self) -> bool {
!self.is_empty()
}
fn repair(&self) -> Option<&dyn Fn(&VecDeque<T>) -> bool> {
None }
}
impl<T> Glass<LinkedList<T>> for LinkedList<T>
where
T: Glass<T>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::containers::LinkedList");
&POS
}
fn severity(&self) -> Severity {
if self.is_empty() {
Severity::Cracked
} else {
Severity::Stable
}
}
fn payload(&self) -> Option<&LinkedList<T>> {
Some(self)
}
fn into_payload(self) -> Option<LinkedList<T>> {
Some(self)
}
}
impl<T> GlassStable<LinkedList<T>> for LinkedList<T>
where
T: Glass<T>,
Self: Glass<LinkedList<T>>,
{
fn value(&self) -> &LinkedList<T> {
self
}
fn into_value(self) -> LinkedList<T> {
self
}
}
impl<T> GlassCracked<LinkedList<T>> for LinkedList<T>
where
T: Glass<T>,
Self: Glass<LinkedList<T>>,
{
fn is_holding(&self) -> bool {
!self.is_empty()
}
fn repair(&self) -> Option<&dyn Fn(&LinkedList<T>) -> bool> {
None }
}
impl<K, V> Glass<HashMap<K, V>> for HashMap<K, V>
where
K: Glass<K>,
V: Glass<V>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::containers::HashMap");
&POS
}
fn severity(&self) -> Severity {
if self.is_empty() {
Severity::Cracked
} else {
Severity::Stable
}
}
fn payload(&self) -> Option<&HashMap<K, V>> {
Some(self)
}
fn into_payload(self) -> Option<HashMap<K, V>> {
Some(self)
}
}
impl<K, V> GlassStable<HashMap<K, V>> for HashMap<K, V>
where
K: Glass<K>,
V: Glass<V>,
Self: Glass<HashMap<K, V>>,
{
fn value(&self) -> &HashMap<K, V> {
self
}
fn into_value(self) -> HashMap<K, V> {
self
}
}
impl<K, V> GlassCracked<HashMap<K, V>> for HashMap<K, V>
where
K: Glass<K>,
V: Glass<V>,
Self: Glass<HashMap<K, V>>,
{
fn is_holding(&self) -> bool {
!self.is_empty()
}
fn repair(&self) -> Option<&dyn Fn(&HashMap<K, V>) -> bool> {
None }
}
impl<K, V> Glass<BTreeMap<K, V>> for BTreeMap<K, V>
where
K: Glass<K>,
V: Glass<V>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::containers::BTreeMap");
&POS
}
fn severity(&self) -> Severity {
if self.is_empty() {
Severity::Cracked
} else {
Severity::Stable
}
}
fn payload(&self) -> Option<&BTreeMap<K, V>> {
Some(self)
}
fn into_payload(self) -> Option<BTreeMap<K, V>> {
Some(self)
}
}
impl<K, V> GlassStable<BTreeMap<K, V>> for BTreeMap<K, V>
where
K: Glass<K>,
V: Glass<V>,
Self: Glass<BTreeMap<K, V>>,
{
fn value(&self) -> &BTreeMap<K, V> {
self
}
fn into_value(self) -> BTreeMap<K, V> {
self
}
}
impl<K, V> GlassCracked<BTreeMap<K, V>> for BTreeMap<K, V>
where
K: Glass<K>,
V: Glass<V>,
Self: Glass<BTreeMap<K, V>>,
{
fn is_holding(&self) -> bool {
!self.is_empty()
}
fn repair(&self) -> Option<&dyn Fn(&BTreeMap<K, V>) -> bool> {
None }
}
impl<T> Glass<HashSet<T>> for HashSet<T>
where
T: Glass<T>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::containers::HashSet");
&POS
}
fn severity(&self) -> Severity {
if self.is_empty() {
Severity::Cracked
} else {
Severity::Stable
}
}
fn payload(&self) -> Option<&HashSet<T>> {
Some(self)
}
fn into_payload(self) -> Option<HashSet<T>> {
Some(self)
}
}
impl<T> GlassStable<HashSet<T>> for HashSet<T>
where
T: Glass<T>,
Self: Glass<HashSet<T>>,
{
fn value(&self) -> &HashSet<T> {
self
}
fn into_value(self) -> HashSet<T> {
self
}
}
impl<T> GlassCracked<HashSet<T>> for HashSet<T>
where
T: Glass<T>,
Self: Glass<HashSet<T>>,
{
fn is_holding(&self) -> bool {
!self.is_empty()
}
fn repair(&self) -> Option<&dyn Fn(&HashSet<T>) -> bool> {
None }
}
impl<T> Glass<BTreeSet<T>> for BTreeSet<T>
where
T: Glass<T>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::containers::BTreeSet");
&POS
}
fn severity(&self) -> Severity {
if self.is_empty() {
Severity::Cracked
} else {
Severity::Stable
}
}
fn payload(&self) -> Option<&BTreeSet<T>> {
Some(self)
}
fn into_payload(self) -> Option<BTreeSet<T>> {
Some(self)
}
}
impl<T> GlassStable<BTreeSet<T>> for BTreeSet<T>
where
T: Glass<T>,
Self: Glass<BTreeSet<T>>,
{
fn value(&self) -> &BTreeSet<T> {
self
}
fn into_value(self) -> BTreeSet<T> {
self
}
}
impl<T> GlassCracked<BTreeSet<T>> for BTreeSet<T>
where
T: Glass<T>,
Self: Glass<BTreeSet<T>>,
{
fn is_holding(&self) -> bool {
!self.is_empty()
}
fn repair(&self) -> Option<&dyn Fn(&BTreeSet<T>) -> bool> {
None }
}
impl<T, const N: usize> Glass<[T; N]> for [T; N]
where
T: Glass<T>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::containers::Array");
&POS
}
fn severity(&self) -> Severity {
if N == 0 {
Severity::Cracked
} else {
Severity::Stable
}
}
fn payload(&self) -> Option<&[T; N]> {
Some(self)
}
fn into_payload(self) -> Option<[T; N]> {
Some(self)
}
}
impl<T, const N: usize> GlassStable<[T; N]> for [T; N]
where
T: Glass<T>,
Self: Glass<[T; N]>,
{
fn value(&self) -> &[T; N] {
self
}
fn into_value(self) -> [T; N] {
self
}
}
impl<T, const N: usize> GlassCracked<[T; N]> for [T; N]
where
T: Glass<T>,
Self: Glass<[T; N]>,
{
fn is_holding(&self) -> bool {
N > 0
}
fn repair(&self) -> Option<&dyn Fn(&[T; N]) -> bool> {
None }
}
impl<T> Glass<[T]> for [T]
where
T: Glass<T>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::containers::Slice");
&POS
}
fn severity(&self) -> Severity {
if self.is_empty() {
Severity::Cracked
} else {
Severity::Stable
}
}
fn payload(&self) -> Option<&[T]> {
Some(self)
}
fn into_payload(self) -> Option<[T]> {
Some(self)
}
}
impl<T> GlassStable<[T]> for [T]
where
T: Glass<T>,
Self: Glass<[T]>,
{
fn value(&self) -> &[T] {
self
}
fn into_value(self) -> [T] {
self
}
}
impl<T> GlassCracked<[T]> for [T]
where
T: Glass<T>,
Self: Glass<[T]>,
{
fn is_holding(&self) -> bool {
!self.is_empty()
}
fn repair(&self) -> Option<&dyn Fn(&[T]) -> bool> {
None }
}
impl<T> Glass<Box<T>> for Box<T>
where
T: Glass<T>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::smart_pointers::Box");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&Box<T>> {
Some(self)
}
fn into_payload(self) -> Option<Box<T>> {
Some(self)
}
}
impl<T> GlassStable<Box<T>> for Box<T>
where
T: Glass<T>,
{
fn value(&self) -> &Box<T> {
self
}
fn into_value(self) -> Box<T> {
self
}
}
impl<T> Glass<Rc<T>> for Rc<T>
where
T: Glass<T>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::smart_pointers::Rc");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&Rc<T>> {
Some(self)
}
fn into_payload(self) -> Option<Rc<T>> {
Some(self)
}
}
impl<T> GlassStable<Rc<T>> for Rc<T>
where
T: Glass<T>,
{
fn value(&self) -> &Rc<T> {
self
}
fn into_value(self) -> Rc<T> {
self
}
}
impl<T> Glass<Arc<T>> for Arc<T>
where
T: Glass<T>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::smart_pointers::Arc");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&Arc<T>> {
Some(self)
}
fn into_payload(self) -> Option<Arc<T>> {
Some(self)
}
}
impl<T> GlassStable<Arc<T>> for Arc<T>
where
T: Glass<T>,
{
fn value(&self) -> &Arc<T> {
self
}
fn into_value(self) -> Arc<T> {
self
}
}
impl<T> Glass<&T> for &T
where
T: Glass<T>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::smart_pointers::Reference");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&&T> {
Some(self)
}
fn into_payload(self) -> Option<&T> {
Some(self)
}
}
impl<T> GlassStable<&T> for &T
where
T: Glass<T>,
{
fn value(&self) -> &&T {
self
}
fn into_value(self) -> &T {
self
}
}
impl<T> Glass<&mut T> for &mut T
where
T: Glass<T>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::smart_pointers::MutableReference");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&&mut T> {
Some(self)
}
fn into_payload(self) -> Option<&mut T> {
Some(self)
}
}
impl<T> GlassStable<&mut T> for &mut T
where
T: Glass<T>,
{
fn value(&self) -> &&mut T {
self
}
fn into_value(self) -> &mut T {
self
}
}
impl<T> Glass<Option<T>> for Option<T>
where
T: Glass<T>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::containers::Option");
&POS
}
fn severity(&self) -> Severity {
match self {
Some(_) => Severity::Stable,
None => Severity::Cracked, }
}
fn payload(&self) -> Option<&Option<T>> {
Some(self)
}
fn into_payload(self) -> Option<Option<T>> {
Some(self)
}
}
impl<T> GlassStable<Option<T>> for Option<T>
where
T: Glass<T>,
Self: Glass<Option<T>>,
{
fn value(&self) -> &Option<T> {
self
}
fn into_value(self) -> Option<T> {
self
}
}
impl<T> GlassCracked<Option<T>> for Option<T>
where
T: Glass<T>,
Self: Glass<Option<T>>,
{
fn is_holding(&self) -> bool {
self.is_some()
}
fn repair(&self) -> Option<&dyn Fn(&Option<T>) -> bool> {
None }
}
impl<T, E, GLASS> Glass<Result<T, E>> for Result<T, E>
where
T: Glass<T>,
E: Glass<E>,
GLASS: Glass<Result<T, E>>,
{
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::containers::Result");
&POS
}
fn severity(&self) -> Severity {
match self {
Ok(_) => Severity::Stable,
Err(_) => Severity::Shattered, }
}
fn payload(&self) -> Option<&GLASS> {
Some(self)
}
fn into_payload(self) -> Option<GLASS> {
Some(self)
}
}
impl Glass<std::fs::File> for std::fs::File {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::io::File");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable }
fn payload(&self) -> Option<&std::fs::File> {
Some(self)
}
fn into_payload(self) -> Option<std::fs::File> {
Some(self)
}
}
impl GlassStable<std::fs::File> for std::fs::File {
fn value(&self) -> &std::fs::File {
self
}
fn into_value(self) -> std::fs::File {
self
}
}
impl Glass<std::path::Path> for std::path::Path {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::io::Path");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&std::path::Path> {
Some(self)
}
fn into_payload(self) -> Option<std::path::Path> {
Some(self)
}
}
impl GlassStable<std::path::Path> for std::path::Path {
fn value(&self) -> &std::path::Path {
self
}
fn into_value(self) -> std::path::Path {
self
}
}
impl Glass<std::path::PathBuf> for std::path::PathBuf {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::io::PathBuf");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable
}
fn payload(&self) -> Option<&std::path::PathBuf> {
Some(self)
}
fn into_payload(self) -> Option<std::path::PathBuf> {
Some(self)
}
}
impl GlassStable<std::path::PathBuf> for std::path::PathBuf {
fn value(&self) -> &std::path::PathBuf {
self
}
fn into_value(self) -> std::path::PathBuf {
self
}
}
impl Glass<std::io::Stdin> for std::io::Stdin {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::io::Stdin");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable }
fn payload(&self) -> Option<&std::io::Stdin> {
Some(self)
}
fn into_payload(self) -> Option<std::io::Stdin> {
Some(self)
}
}
impl GlassStable<std::io::Stdin> for std::io::Stdin {
fn value(&self) -> &std::io::Stdin {
self
}
fn into_value(self) -> std::io::Stdin {
self
}
}
impl Glass<std::io::Stdout> for std::io::Stdout {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::io::Stdout");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable }
fn payload(&self) -> Option<&std::io::Stdout> {
Some(self)
}
fn into_payload(self) -> Option<std::io::Stdout> {
Some(self)
}
}
impl GlassStable<std::io::Stdout> for std::io::Stdout {
fn value(&self) -> &std::io::Stdout {
self
}
fn into_value(self) -> std::io::Stdout {
self
}
}
impl Glass<std::io::Stderr> for std::io::Stderr {
fn position(&self) -> &Position {
static POS: Position = Position::new("Daemonic::Glass::io::Stderr");
&POS
}
fn severity(&self) -> Severity {
Severity::Stable }
fn payload(&self) -> Option<&std::io::Stderr> {
Some(self)
}
fn into_payload(self) -> Option<std::io::Stderr> {
Some(self)
}
}
impl GlassStable<std::io::Stderr> for std::io::Stderr {
fn value(&self) -> &std::io::Stderr {
self
}
fn into_value(self) -> std::io::Stderr {
self
}
}