#[derive(trixy::__private::thiserror::Error)]
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub enum ErrorOne {
#[error("I'm an error")]
Error,
#[error("I'm also an error'")]
ErrorB,
}
impl From<crate::ErrorOne_c> for ErrorOne {
fn from(value: crate::ErrorOne_c) -> Self {
match value {
crate::ErrorOne_c::Error => Self::Error,
crate::ErrorOne_c::ErrorB => Self::ErrorB,
}
}
}
#[derive(Debug)]
pub enum Commands {}
#[derive(Debug)]
pub struct OurResult<T, E> {
value: Result<T, E>,
}
impl<T, E> std::ops::Deref for OurResult<T, E> {
type Target = Result<T, E>;
fn deref(&self) -> &Self::Target {
&self.value
}
}
impl<T, E> From<Result<T, E>> for OurResult<T, E> {
fn from(value: Result<T, E>) -> Self {
Self { value }
}
}
#[derive(Debug)]
pub struct OurOption<T> {
value: Option<T>,
}
impl<T> std::ops::Deref for OurOption<T> {
type Target = Option<T>;
fn deref(&self) -> &Self::Target {
&self.value
}
}
impl<T> From<Option<T>> for OurOption<T> {
fn from(value: Option<T>) -> Self {
Self { value }
}
}
#[derive(Debug)]
pub struct OurVec<T> {
value: Vec<T>,
}
impl<T> std::ops::Deref for OurVec<T> {
type Target = Vec<T>;
fn deref(&self) -> &Self::Target {
&self.value
}
}
impl<T> From<Vec<T>> for OurVec<T> {
fn from(value: Vec<T>) -> Self {
Self { value }
}
}
#[derive(trixy::__private::thiserror::Error)]
#[allow(non_camel_case_types)]
#[repr(C)]
#[derive(Debug)]
pub enum ErrorOne_c {
#[error("I'm an error")]
Error,
#[error("I'm also an error'")]
ErrorB,
}
impl From<crate::ErrorOne> for ErrorOne_c {
fn from(value: crate::ErrorOne) -> Self {
match value {
crate::ErrorOne::Error => Self::Error,
crate::ErrorOne::ErrorB => Self::ErrorB,
}
}
}