This commit is contained in:
nora 2022-03-04 22:15:19 +01:00
parent 93ce632b5d
commit 4346db648f
24 changed files with 224 additions and 209 deletions

View file

@ -2,8 +2,7 @@
// This file has been generated by `xtask/src/codegen`. Do not edit it manually.
pub mod parse {
use crate::error::TransError;
use crate::methods::parse_helper::*;
use crate::{error::TransError, methods::parse_helper::*};
use amqp_core::methods::*;
use nom::{branch::alt, bytes::complete::tag};
use once_cell::sync::Lazy;
@ -887,8 +886,7 @@ pub mod parse {
}
}
pub mod write {
use crate::error::TransError;
use crate::methods::write_helper::*;
use crate::{error::TransError, methods::write_helper::*};
use amqp_core::methods::*;
use std::io::Write;

View file

@ -1,6 +1,8 @@
use crate::error::TransError;
use amqp_core::error::ConException;
use amqp_core::methods::{FieldValue, Method, Table};
use amqp_core::{
error::ConException,
methods::{FieldValue, Method, Table},
};
use rand::Rng;
mod generated;

View file

@ -1,17 +1,22 @@
use crate::error::TransError;
use crate::methods::generated::parse::IResult;
use amqp_core::error::{ConException, ProtocolError};
use amqp_core::methods::{
Bit, FieldValue, Long, Longlong, Longstr, Octet, Short, Shortstr, Table, TableFieldName,
Timestamp,
use crate::{error::TransError, methods::generated::parse::IResult};
use amqp_core::{
error::{ConException, ProtocolError},
methods::{
Bit, FieldValue, Long, Longlong, Longstr, Octet, Short, Shortstr, Table, TableFieldName,
Timestamp,
},
};
use nom::{
branch::alt,
bytes::complete::{tag, take},
error::ErrorKind,
multi::{count, many0},
number::{
complete::{f32, f64, i16, i32, i64, i8, u16, u32, u64, u8},
Endianness::Big,
},
Err,
};
use nom::branch::alt;
use nom::bytes::complete::{tag, take};
use nom::error::ErrorKind;
use nom::multi::{count, many0};
use nom::number::complete::{f32, f64, i16, i32, i64, i8, u16, u32, u64, u8};
use nom::number::Endianness::Big;
use nom::Err;
impl<T> nom::error::ParseError<T> for TransError {
fn from_error_kind(_input: T, _kind: ErrorKind) -> Self {

View file

@ -1,5 +1,4 @@
use crate::error::TransError;
use crate::methods::FieldValue;
use crate::{error::TransError, methods::FieldValue};
use amqp_core::methods::{Bit, Long, Longlong, Longstr, Octet, Short, Shortstr, Table, Timestamp};
use anyhow::Context;
use std::io::Write;