#[non_exhaustive]pub enum NetconfClientError {
Show 13 variants
Io(Error),
Ssh(String),
SerializingFailure(String),
Netconf {
operation: String,
reply: RpcReply,
},
UnknownDatastore {
expected: Vec<String>,
unknown: String,
},
MalformedChunk {
expected: char,
actual: char,
},
MessageTooLarge {
limit: usize,
},
Timeout {
timeout: Duration,
},
SessionDesynchronized,
MessageIdMismatch {
expected: String,
actual: String,
},
CommitUnknown,
HostKeyRejected {
host: String,
fingerprint: String,
reason: String,
},
Other(String),
}Expand description
Transport, framing, XML, or NETCONF <rpc-error> failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
I/O failure on the underlying stream.
Ssh(String)
ssh only.SSH handshake, auth, or subsystem error.
SerializingFailure(String)
XML serialize or deserialize failure.
Netconf
Device returned one or more <rpc-error> elements.
Fields
UnknownDatastore
Datastore name was not running, candidate, startup, or a URL.
Fields
MalformedChunk
1.1 chunk header did not match \n#N\n / \n##\n.
Fields
MessageTooLarge
Reply exceeded the framer’s size limit.
Raised for an over-long chunk header as well as for a body that grows
past the limit. Tune with
AsyncFramer::set_max_message_size.
Timeout
tokio only.RPC exceeded Connection::set_timeout.
The reply may still be in flight, so the session is left unusable.
SessionDesynchronized
An RPC was attempted after a timeout left the session out of sync.
MessageIdMismatch
Reply message-id did not match the request (RFC6241 4.1).
The mismatched message has been consumed, so the real reply may still be in flight. The session is left unusable.
CommitUnknown
Connection dropped after <commit> / <commit-configuration> was sent.
The device may already have applied the change. This is not a clean I/O error — verify device state before retrying.
HostKeyRejected
ssh only.Server host key was rejected by the configured crate::transport::ssh::HostKeyPolicy.
Fields
Other(String)
Anything that does not fit the other variants.
Implementations§
Source§impl NetconfClientError
impl NetconfClientError
Sourcepub fn new(msg: impl Into<String>) -> Self
pub fn new(msg: impl Into<String>) -> Self
Wrap an arbitrary message as NetconfClientError::Other.
Trait Implementations§
Source§impl Debug for NetconfClientError
impl Debug for NetconfClientError
Source§impl Display for NetconfClientError
impl Display for NetconfClientError
Source§impl Error for NetconfClientError
impl Error for NetconfClientError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()