use thiserror::Error;
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Error, Debug)]
pub enum Error {
#[error("Received an unknown message type: {0}")]
UnknownMessageType(u8),
#[error("An invalid message was received: {0}")]
InvalidMessage(String),
#[error("An error occurred communicating with the agent")]
AgentCommunicationError(#[from] std::io::Error),
#[error("An ssh key operation failed")]
SSHKey(#[from] ssh_key::Error),
#[error("An ssh encoding operation failed")]
SSHEncoding(#[from] ssh_encoding::Error),
#[error("The remote ssh agent returned the failure message")]
RemoteFailure,
}