| 1 | |
| 2 |
|
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 |
|
| 9 | use crate::{
|
| 10 | alloc::{layout::LayoutError, AllocError},
|
| 11 | fmt,
|
| 12 | str::CStr,
|
| 13 | };
|
| 14 |
|
| 15 | use core::num::NonZeroI32;
|
| 16 | use core::num::TryFromIntError;
|
| 17 | use core::str::Utf8Error;
|
| 18 |
|
| 19 | |
| 20 | #[rustfmt::skip]
|
| 21 | pub mod code {
|
| 22 | macro_rules! declare_err {
|
| 23 | ($err:tt $(,)? $($doc:expr),+) => {
|
| 24 | $(
|
| 25 | #[doc = $doc]
|
| 26 | )*
|
| 27 | pub const $err: super::Error =
|
| 28 | super::Error::try_from_errno(-(crate::bindings::$err as i32))
|
| 29 | .expect("Invalid errno in `declare_err!`");
|
| 30 | };
|
| 31 | }
|
| 32 |
|
| 33 | |
| 34 | declare_err!(EPERM, "Operation not permitted.");
|
| 35 | declare_err!(ENOENT, "No such file or directory.");
|
| 36 | declare_err!(ESRCH, "No such process.");
|
| 37 | declare_err!(EINTR, "Interrupted system call.");
|
| 38 | declare_err!(EIO, "I/O error.");
|
| 39 | declare_err!(ENXIO, "No such device or address.");
|
| 40 | declare_err!(E2BIG, "Argument list too long.");
|
| 41 | declare_err!(ENOEXEC, "Exec format error.");
|
| 42 | declare_err!(EBADF, "Bad file number.");
|
| 43 | declare_err!(ECHILD, "No child processes.");
|
| 44 | declare_err!(EAGAIN, "Try again.");
|
| 45 | declare_err!(ENOMEM, "Out of memory.");
|
| 46 | declare_err!(EACCES, "Permission denied.");
|
| 47 | declare_err!(EFAULT, "Bad address.");
|
| 48 | declare_err!(ENOTBLK, "Block device required.");
|
| 49 | declare_err!(EBUSY, "Device or resource busy.");
|
| 50 | declare_err!(EEXIST, "File exists.");
|
| 51 | declare_err!(EXDEV, "Cross-device link.");
|
| 52 | declare_err!(ENODEV, "No such device.");
|
| 53 | declare_err!(ENOTDIR, "Not a directory.");
|
| 54 | declare_err!(EISDIR, "Is a directory.");
|
| 55 | declare_err!(EINVAL, "Invalid argument.");
|
| 56 | declare_err!(ENFILE, "File table overflow.");
|
| 57 | declare_err!(EMFILE, "Too many open files.");
|
| 58 | declare_err!(ENOTTY, "Not a typewriter.");
|
| 59 | declare_err!(ETXTBSY, "Text file busy.");
|
| 60 | declare_err!(EFBIG, "File too large.");
|
| 61 | declare_err!(ENOSPC, "No space left on device.");
|
| 62 | declare_err!(ESPIPE, "Illegal seek.");
|
| 63 | declare_err!(EROFS, "Read-only file system.");
|
| 64 | declare_err!(EMLINK, "Too many links.");
|
| 65 | declare_err!(EPIPE, "Broken pipe.");
|
| 66 | declare_err!(EDOM, "Math argument out of domain of func.");
|
| 67 | declare_err!(ERANGE, "Math result not representable.");
|
| 68 |
|
| 69 | |
| 70 | declare_err!(EDEADLK, "Resource deadlock would occur.");
|
| 71 | declare_err!(ENAMETOOLONG, "File name too long.");
|
| 72 | declare_err!(ENOLCK, "No record locks available.");
|
| 73 | declare_err!(ENOSYS, "Invalid system call number.");
|
| 74 | declare_err!(ENOTEMPTY, "Directory not empty.");
|
| 75 | declare_err!(ELOOP, "Too many symbolic links encountered.");
|
| 76 | declare_err!(ENOMSG, "No message of desired type.");
|
| 77 | declare_err!(EIDRM, "Identifier removed.");
|
| 78 | declare_err!(ECHRNG, "Channel number out of range.");
|
| 79 | declare_err!(EL2NSYNC, "Level 2 not synchronized.");
|
| 80 | declare_err!(EL3HLT, "Level 3 halted.");
|
| 81 | declare_err!(EL3RST, "Level 3 reset.");
|
| 82 | declare_err!(ELNRNG, "Link number out of range.");
|
| 83 | declare_err!(EUNATCH, "Protocol driver not attached.");
|
| 84 | declare_err!(ENOCSI, "No CSI structure available.");
|
| 85 | declare_err!(EL2HLT, "Level 2 halted.");
|
| 86 | declare_err!(EBADE, "Invalid exchange.");
|
| 87 | declare_err!(EBADR, "Invalid request descriptor.");
|
| 88 | declare_err!(EXFULL, "Exchange full.");
|
| 89 | declare_err!(ENOANO, "No anode.");
|
| 90 | declare_err!(EBADRQC, "Invalid request code.");
|
| 91 | declare_err!(EBADSLT, "Invalid slot.");
|
| 92 | declare_err!(EBFONT, "Bad font file format.");
|
| 93 | declare_err!(ENOSTR, "Device not a stream.");
|
| 94 | declare_err!(ENODATA, "No data available.");
|
| 95 | declare_err!(ETIME, "Timer expired.");
|
| 96 | declare_err!(ENOSR, "Out of streams resources.");
|
| 97 | declare_err!(ENONET, "Machine is not on the network.");
|
| 98 | declare_err!(ENOPKG, "Package not installed.");
|
| 99 | declare_err!(EREMOTE, "Object is remote.");
|
| 100 | declare_err!(ENOLINK, "Link has been severed.");
|
| 101 | declare_err!(EADV, "Advertise error.");
|
| 102 | declare_err!(ESRMNT, "Srmount error.");
|
| 103 | declare_err!(ECOMM, "Communication error on send.");
|
| 104 | declare_err!(EPROTO, "Protocol error.");
|
| 105 | declare_err!(EMULTIHOP, "Multihop attempted.");
|
| 106 | declare_err!(EDOTDOT, "RFS specific error.");
|
| 107 | declare_err!(EBADMSG, "Not a data message.");
|
| 108 | declare_err!(EFSBADCRC, "Bad CRC detected.");
|
| 109 | declare_err!(EOVERFLOW, "Value too large for defined data type.");
|
| 110 | declare_err!(ENOTUNIQ, "Name not unique on network.");
|
| 111 | declare_err!(EBADFD, "File descriptor in bad state.");
|
| 112 | declare_err!(EREMCHG, "Remote address changed.");
|
| 113 | declare_err!(ELIBACC, "Can not access a needed shared library.");
|
| 114 | declare_err!(ELIBBAD, "Accessing a corrupted shared library.");
|
| 115 | declare_err!(ELIBSCN, ".lib section in a.out corrupted.");
|
| 116 | declare_err!(ELIBMAX, "Attempting to link in too many shared libraries.");
|
| 117 | declare_err!(ELIBEXEC, "Cannot exec a shared library directly.");
|
| 118 | declare_err!(EILSEQ, "Illegal byte sequence.");
|
| 119 | declare_err!(ERESTART, "Interrupted system call should be restarted.");
|
| 120 | declare_err!(ESTRPIPE, "Streams pipe error.");
|
| 121 | declare_err!(EUSERS, "Too many users.");
|
| 122 | declare_err!(ENOTSOCK, "Socket operation on non-socket.");
|
| 123 | declare_err!(EDESTADDRREQ, "Destination address required.");
|
| 124 | declare_err!(EMSGSIZE, "Message too long.");
|
| 125 | declare_err!(EPROTOTYPE, "Protocol wrong type for socket.");
|
| 126 | declare_err!(ENOPROTOOPT, "Protocol not available.");
|
| 127 | declare_err!(EPROTONOSUPPORT, "Protocol not supported.");
|
| 128 | declare_err!(ESOCKTNOSUPPORT, "Socket type not supported.");
|
| 129 | declare_err!(EOPNOTSUPP, "Operation not supported on transport endpoint.");
|
| 130 | declare_err!(EPFNOSUPPORT, "Protocol family not supported.");
|
| 131 | declare_err!(EAFNOSUPPORT, "Address family not supported by protocol.");
|
| 132 | declare_err!(EADDRINUSE, "Address already in use.");
|
| 133 | declare_err!(EADDRNOTAVAIL, "Cannot assign requested address.");
|
| 134 | declare_err!(ENETDOWN, "Network is down.");
|
| 135 | declare_err!(ENETUNREACH, "Network is unreachable.");
|
| 136 | declare_err!(ENETRESET, "Network dropped connection because of reset.");
|
| 137 | declare_err!(ECONNABORTED, "Software caused connection abort.");
|
| 138 | declare_err!(ECONNRESET, "Connection reset by peer.");
|
| 139 | declare_err!(ENOBUFS, "No buffer space available.");
|
| 140 | declare_err!(EISCONN, "Transport endpoint is already connected.");
|
| 141 | declare_err!(ENOTCONN, "Transport endpoint is not connected.");
|
| 142 | declare_err!(ESHUTDOWN, "Cannot send after transport endpoint shutdown.");
|
| 143 | declare_err!(ETOOMANYREFS, "Too many references: cannot splice.");
|
| 144 | declare_err!(ETIMEDOUT, "Connection timed out.");
|
| 145 | declare_err!(ECONNREFUSED, "Connection refused.");
|
| 146 | declare_err!(EHOSTDOWN, "Host is down.");
|
| 147 | declare_err!(EHOSTUNREACH, "No route to host.");
|
| 148 | declare_err!(EALREADY, "Operation already in progress.");
|
| 149 | declare_err!(EINPROGRESS, "Operation now in progress.");
|
| 150 | declare_err!(ESTALE, "Stale file handle.");
|
| 151 | declare_err!(EUCLEAN, "Structure needs cleaning.");
|
| 152 | declare_err!(EFSCORRUPTED, "Filesystem is corrupted.");
|
| 153 | declare_err!(ENOTNAM, "Not a XENIX named type file.");
|
| 154 | declare_err!(ENAVAIL, "No XENIX semaphores available.");
|
| 155 | declare_err!(EISNAM, "Is a named type file.");
|
| 156 | declare_err!(EREMOTEIO, "Remote I/O error.");
|
| 157 | declare_err!(EDQUOT, "Quota exceeded.");
|
| 158 | declare_err!(ENOMEDIUM, "No medium found.");
|
| 159 | declare_err!(EMEDIUMTYPE, "Wrong medium type.");
|
| 160 | declare_err!(ECANCELED, "Operation Canceled.");
|
| 161 | declare_err!(ENOKEY, "Required key not available.");
|
| 162 | declare_err!(EKEYEXPIRED, "Key has expired.");
|
| 163 | declare_err!(EKEYREVOKED, "Key has been revoked.");
|
| 164 | declare_err!(EKEYREJECTED, "Key was rejected by service.");
|
| 165 | declare_err!(EOWNERDEAD, "Owner died.");
|
| 166 | declare_err!(ENOTRECOVERABLE, "State not recoverable.");
|
| 167 | declare_err!(ERFKILL, "Operation not possible due to RF-kill.");
|
| 168 | declare_err!(EHWPOISON, "Memory page has hardware error.");
|
| 169 | declare_err!(EFTYPE, "Wrong file type for the intended operation.");
|
| 170 |
|
| 171 | |
| 172 | declare_err!(ERESTARTSYS, "Restart the system call.");
|
| 173 | declare_err!(ERESTARTNOINTR, "System call was interrupted by a signal and will be restarted.");
|
| 174 | declare_err!(ERESTARTNOHAND, "Restart if no handler.");
|
| 175 | declare_err!(ENOIOCTLCMD, "No ioctl command.");
|
| 176 | declare_err!(ERESTART_RESTARTBLOCK, "Restart by calling sys_restart_syscall.");
|
| 177 | declare_err!(EPROBE_DEFER, "Driver requests probe retry.");
|
| 178 | declare_err!(EOPENSTALE, "Open found a stale dentry.");
|
| 179 | declare_err!(ENOPARAM, "Parameter not supported.");
|
| 180 | declare_err!(EBADHANDLE, "Illegal NFS file handle.");
|
| 181 | declare_err!(ENOTSYNC, "Update synchronization mismatch.");
|
| 182 | declare_err!(EBADCOOKIE, "Cookie is stale.");
|
| 183 | declare_err!(ENOTSUPP, "Operation is not supported.");
|
| 184 | declare_err!(ETOOSMALL, "Buffer or request is too small.");
|
| 185 | declare_err!(ESERVERFAULT, "An untranslatable error occurred.");
|
| 186 | declare_err!(EBADTYPE, "Type not supported by server.");
|
| 187 | declare_err!(EJUKEBOX, "Request initiated, but will not complete before timeout.");
|
| 188 | declare_err!(EIOCBQUEUED, "iocb queued, will get completion event.");
|
| 189 | declare_err!(ERECALLCONFLICT, "Conflict with recalled state.");
|
| 190 | declare_err!(ENOGRACE, "NFS file lock reclaim refused.");
|
| 191 | }
|
| 192 |
|
| 193 | |
| 194 | |
| 195 | |
| 196 | |
| 197 | |
| 198 | |
| 199 | |
| 200 | |
| 201 | #[derive(Clone, Copy, PartialEq, Eq)]
|
| 202 | pub struct Error(NonZeroI32);
|
| 203 |
|
| 204 | impl Error {
|
| 205 | |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | |
| 211 | |
| 212 | |
| 213 | |
| 214 | |
| 215 | |
| 216 | |
| 217 | |
| 218 | |
| 219 | |
| 220 | |
| 221 | |
| 222 | |
| 223 | |
| 224 | pub fn from_errno(errno: crate::ffi::c_int) -> Error {
|
| 225 | if let Some(error) = Self::try_from_errno(errno) {
|
| 226 | error
|
| 227 | } else {
|
| 228 | |
| 229 | crate::pr_warn!(
|
| 230 | "attempted to create `Error` with out of range `errno`: {}\n",
|
| 231 | errno
|
| 232 | );
|
| 233 | code::EINVAL
|
| 234 | }
|
| 235 | }
|
| 236 |
|
| 237 | |
| 238 | |
| 239 | |
| 240 | const fn try_from_errno(errno: crate::ffi::c_int) -> Option<Error> {
|
| 241 | if errno < -(bindings::MAX_ERRNO as i32) || errno >= 0 {
|
| 242 | return None;
|
| 243 | }
|
| 244 |
|
| 245 | |
| 246 | Some(unsafe { Error::from_errno_unchecked(errno) })
|
| 247 | }
|
| 248 |
|
| 249 | |
| 250 | |
| 251 | |
| 252 | |
| 253 | |
| 254 | const unsafe fn from_errno_unchecked(errno: crate::ffi::c_int) -> Error {
|
| 255 | |
| 256 | |
| 257 | |
| 258 | Error(unsafe { NonZeroI32::new_unchecked(errno) })
|
| 259 | }
|
| 260 |
|
| 261 | |
| 262 | pub fn to_errno(self) -> crate::ffi::c_int {
|
| 263 | self.0.get()
|
| 264 | }
|
| 265 |
|
| 266 | #[cfg(CONFIG_BLOCK)]
|
| 267 | pub(crate) fn to_blk_status(self) -> bindings::blk_status_t {
|
| 268 | |
| 269 | unsafe { bindings::errno_to_blk_status(self.0.get()) }
|
| 270 | }
|
| 271 |
|
| 272 | |
| 273 | pub fn to_ptr<T>(self) -> *mut T {
|
| 274 | |
| 275 | unsafe { bindings::ERR_PTR(self.0.get() as crate::ffi::c_long).cast() }
|
| 276 | }
|
| 277 |
|
| 278 | |
| 279 | #[cfg(not(testlib))]
|
| 280 | pub fn name(&self) -> Option<&'static CStr> {
|
| 281 | |
| 282 | let ptr = unsafe { bindings::errname(-self.0.get()) };
|
| 283 | if ptr.is_null() {
|
| 284 | None
|
| 285 | } else {
|
| 286 | use crate::str::CStrExt as _;
|
| 287 |
|
| 288 | |
| 289 | Some(unsafe { CStr::from_char_ptr(ptr) })
|
| 290 | }
|
| 291 | }
|
| 292 |
|
| 293 | |
| 294 | |
| 295 | |
| 296 | |
| 297 | |
| 298 | #[cfg(testlib)]
|
| 299 | pub fn name(&self) -> Option<&'static CStr> {
|
| 300 | None
|
| 301 | }
|
| 302 | }
|
| 303 |
|
| 304 | impl fmt::Debug for Error {
|
| 305 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
| 306 | match self.name() {
|
| 307 | |
| 308 | None => f.debug_tuple("Error").field(&-self.0).finish(),
|
| 309 | Some(name) => f
|
| 310 | .debug_tuple(
|
| 311 | |
| 312 | unsafe { core::str::from_utf8_unchecked(name.to_bytes()) },
|
| 313 | )
|
| 314 | .finish(),
|
| 315 | }
|
| 316 | }
|
| 317 | }
|
| 318 |
|
| 319 | impl From<AllocError> for Error {
|
| 320 | #[inline]
|
| 321 | fn from(_: AllocError) -> Error {
|
| 322 | code::ENOMEM
|
| 323 | }
|
| 324 | }
|
| 325 |
|
| 326 | impl From<TryFromIntError> for Error {
|
| 327 | #[inline]
|
| 328 | fn from(_: TryFromIntError) -> Error {
|
| 329 | code::EINVAL
|
| 330 | }
|
| 331 | }
|
| 332 |
|
| 333 | impl From<Utf8Error> for Error {
|
| 334 | #[inline]
|
| 335 | fn from(_: Utf8Error) -> Error {
|
| 336 | code::EINVAL
|
| 337 | }
|
| 338 | }
|
| 339 |
|
| 340 | impl From<LayoutError> for Error {
|
| 341 | #[inline]
|
| 342 | fn from(_: LayoutError) -> Error {
|
| 343 | code::ENOMEM
|
| 344 | }
|
| 345 | }
|
| 346 |
|
| 347 | impl From<fmt::Error> for Error {
|
| 348 | #[inline]
|
| 349 | fn from(_: fmt::Error) -> Error {
|
| 350 | code::EINVAL
|
| 351 | }
|
| 352 | }
|
| 353 |
|
| 354 | impl From<core::convert::Infallible> for Error {
|
| 355 | #[inline]
|
| 356 | fn from(e: core::convert::Infallible) -> Error {
|
| 357 | match e {}
|
| 358 | }
|
| 359 | }
|
| 360 |
|
| 361 | |
| 362 | |
| 363 | |
| 364 | |
| 365 | |
| 366 | |
| 367 | |
| 368 | |
| 369 | |
| 370 | |
| 371 | |
| 372 | |
| 373 | |
| 374 | |
| 375 | |
| 376 | |
| 377 | |
| 378 | |
| 379 | |
| 380 | |
| 381 | |
| 382 | |
| 383 | |
| 384 | |
| 385 | |
| 386 | |
| 387 | |
| 388 | |
| 389 | |
| 390 | |
| 391 | |
| 392 | |
| 393 | |
| 394 | |
| 395 | |
| 396 | |
| 397 | |
| 398 | |
| 399 | |
| 400 | |
| 401 | |
| 402 | |
| 403 | |
| 404 | |
| 405 | |
| 406 | |
| 407 | |
| 408 | |
| 409 | |
| 410 | |
| 411 | |
| 412 | |
| 413 | |
| 414 | |
| 415 | |
| 416 | |
| 417 | |
| 418 | |
| 419 | |
| 420 | |
| 421 | |
| 422 | |
| 423 | |
| 424 | |
| 425 | |
| 426 | |
| 427 | |
| 428 | |
| 429 | |
| 430 | |
| 431 | |
| 432 | |
| 433 | |
| 434 | |
| 435 | |
| 436 | |
| 437 | |
| 438 | |
| 439 | |
| 440 | |
| 441 | |
| 442 | |
| 443 | |
| 444 | |
| 445 | |
| 446 | |
| 447 | |
| 448 | |
| 449 | |
| 450 | |
| 451 | |
| 452 | |
| 453 | |
| 454 | |
| 455 | |
| 456 | |
| 457 | |
| 458 | |
| 459 | |
| 460 | |
| 461 | |
| 462 | |
| 463 | |
| 464 | |
| 465 | |
| 466 | |
| 467 | |
| 468 | |
| 469 | |
| 470 | |
| 471 | |
| 472 | |
| 473 | |
| 474 | |
| 475 | |
| 476 | |
| 477 | |
| 478 | |
| 479 | |
| 480 | |
| 481 | |
| 482 | |
| 483 | |
| 484 | |
| 485 | |
| 486 | |
| 487 | |
| 488 | |
| 489 | |
| 490 | |
| 491 | |
| 492 | |
| 493 | |
| 494 | |
| 495 | |
| 496 | |
| 497 | |
| 498 | |
| 499 | |
| 500 | |
| 501 | |
| 502 | pub type Result<T = (), E = Error> = core::result::Result<T, E>;
|
| 503 |
|
| 504 | |
| 505 | |
| 506 | |
| 507 | |
| 508 | |
| 509 | |
| 510 | |
| 511 | |
| 512 | |
| 513 | |
| 514 | |
| 515 | |
| 516 | |
| 517 | |
| 518 | |
| 519 | |
| 520 | |
| 521 | |
| 522 | |
| 523 | |
| 524 | |
| 525 | |
| 526 | |
| 527 | |
| 528 | |
| 529 | |
| 530 | |
| 531 | |
| 532 | |
| 533 | |
| 534 | |
| 535 | |
| 536 | |
| 537 | |
| 538 | |
| 539 | |
| 540 | |
| 541 | pub fn to_result(err: crate::ffi::c_int) -> Result {
|
| 542 | if err < 0 {
|
| 543 | Err(Error::from_errno(err))
|
| 544 | } else {
|
| 545 | Ok(())
|
| 546 | }
|
| 547 | }
|
| 548 |
|
| 549 | |
| 550 | |
| 551 | |
| 552 | |
| 553 | |
| 554 | |
| 555 | |
| 556 | |
| 557 | |
| 558 | |
| 559 | |
| 560 | |
| 561 | |
| 562 | |
| 563 | |
| 564 | |
| 565 | |
| 566 | |
| 567 | |
| 568 | |
| 569 | |
| 570 | |
| 571 | |
| 572 | |
| 573 | |
| 574 | |
| 575 | |
| 576 | |
| 577 | |
| 578 | |
| 579 | |
| 580 | |
| 581 | |
| 582 | |
| 583 | |
| 584 | |
| 585 | |
| 586 | |
| 587 | |
| 588 | |
| 589 | |
| 590 | |
| 591 | |
| 592 | |
| 593 | |
| 594 | |
| 595 | |
| 596 | |
| 597 | |
| 598 | |
| 599 | |
| 600 | |
| 601 | pub fn from_err_ptr<T>(ptr: *mut T) -> Result<*mut T> {
|
| 602 | |
| 603 | let const_ptr: *const crate::ffi::c_void = ptr.cast();
|
| 604 | |
| 605 | if unsafe { bindings::IS_ERR(const_ptr) } {
|
| 606 | |
| 607 | let err = unsafe { bindings::PTR_ERR(const_ptr) };
|
| 608 |
|
| 609 | #[allow(clippy::unnecessary_cast)]
|
| 610 | |
| 611 | |
| 612 | |
| 613 | |
| 614 | |
| 615 | |
| 616 | |
| 617 | |
| 618 | |
| 619 | return Err(unsafe { Error::from_errno_unchecked(err as crate::ffi::c_int) });
|
| 620 | }
|
| 621 | Ok(ptr)
|
| 622 | }
|
| 623 |
|
| 624 | |
| 625 | |
| 626 | |
| 627 | |
| 628 | |
| 629 | |
| 630 | |
| 631 | |
| 632 | |
| 633 | |
| 634 | |
| 635 | |
| 636 | |
| 637 | |
| 638 | |
| 639 | |
| 640 | |
| 641 | |
| 642 | |
| 643 | |
| 644 | |
| 645 | |
| 646 | |
| 647 | pub fn from_result<T, F>(f: F) -> T
|
| 648 | where
|
| 649 | T: From<i16>,
|
| 650 | F: FnOnce() -> Result<T>,
|
| 651 | {
|
| 652 | match f() {
|
| 653 | Ok(v) => v,
|
| 654 | |
| 655 | |
| 656 | |
| 657 | Err(e) => T::from(e.to_errno() as i16),
|
| 658 | }
|
| 659 | }
|
| 660 |
|
| 661 | |
| 662 | pub const VTABLE_DEFAULT_ERROR: &str =
|
| 663 | "This function must not be called, see the #[vtable] documentation.";
|