use bytes::Bytes;
use crate::payload::Update;
use super::machine::BmpState;
#[derive(Debug)]
pub struct ProcessingResult {
pub message_type: MessageType,
pub next_state: BmpState,
}
impl ProcessingResult {
pub fn new(message_type: MessageType, next_state: BmpState) -> Self {
Self {
message_type,
next_state,
}
}
}
#[derive(Debug)]
pub enum MessageType {
InvalidMessage {
known_peer: Option<bool>, msg_bytes: Option<Bytes>, err: String,
},
Other,
RoutingUpdate {
update: Update,
},
StateTransition,
Aborted,
}