netlink_packet_route/nsid/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// SPDX-License-Identifier: MIT

use netlink_packet_utils::nla::NlaError;
use netlink_packet_utils::DecodeError;
use thiserror::Error;

#[derive(Debug, Error)]
pub enum NsidError {
    #[error("Invalid {kind}")]
    InvalidValue { kind: &'static str, error: DecodeError },

    #[error("Unknown NLA type: {kind}")]
    UnknownNLA { kind: u16, error: DecodeError },

    #[error(transparent)]
    ParseNla(#[from] NlaError),
}