fidl_next_codec/encode/
error.rs1use thiserror::Error;
6
7#[derive(Clone, Error, Debug)]
9pub enum EncodeError {
10 #[error("required handle was invalid")]
12 InvalidRequiredHandle,
13
14 #[error("cannot encode unknown union ordinal of {0}")]
16 UnknownUnionOrdinal(usize),
17
18 #[error("cannot encode a {0}-byte value in a 4-byte inline envelope")]
20 ExpectedInline(usize),
21
22 #[error("cannot encode driver handles with this encoder")]
24 DriverHandlesUnsupported,
25
26 #[error("expected a driver handle but was given a zircon handle")]
28 ExpectedDriverHandle,
29
30 #[error("expected a zircon handle but was given a driver handle")]
32 ExpectedZirconHandle,
33
34 #[error("invalid bits were set in a strict bits value")]
36 InvalidStrictBits,
37
38 #[error("validation failed")]
40 Validation(#[from] crate::ValidationError),
41}