mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-17 21:25:01 +01:00
connection working
This commit is contained in:
parent
ca1f372665
commit
13deef42fd
9 changed files with 217 additions and 82 deletions
|
|
@ -1,6 +1,8 @@
|
|||
use std::io::Error;
|
||||
|
||||
pub type Result<T> = std::result::Result<T, TransError>;
|
||||
pub type StdResult<T, E> = std::result::Result<T, E>;
|
||||
|
||||
pub type Result<T> = StdResult<T, TransError>;
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum TransError {
|
||||
|
|
@ -34,7 +36,7 @@ pub enum ConException {
|
|||
FrameError,
|
||||
#[error("503 Command invalid")]
|
||||
CommandInvalid,
|
||||
#[error("503 Syntax error")]
|
||||
#[error("503 Syntax error | {0:?}")]
|
||||
/// A method was received but there was a syntax error. The string stores where it occured.
|
||||
SyntaxError(Vec<String>),
|
||||
#[error("504 Channel error")]
|
||||
|
|
@ -43,5 +45,11 @@ pub enum ConException {
|
|||
Todo,
|
||||
}
|
||||
|
||||
impl ConException {
|
||||
pub fn into_trans(self) -> TransError {
|
||||
TransError::Invalid(ProtocolError::ConException(self))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum ChannelException {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue