1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// This is free and unencumbered software released into the public domain.
//! C type aliases and shared social-handle validation.
//!
//! - [`c`] provides C-compatible primitive aliases and borrowed C strings.
//! - [`handle`] documents the common handle contract and provides validation
//! helpers and errors.
//!
//! Platform types live in their own crates, such as
//! [`known-types-x`](https://docs.rs/known-types-x) and
//! [`known-types-linkedin`](https://docs.rs/known-types-linkedin); they are not
//! re-exported here. Both modules in this crate work without default features
//! or heap allocation.
//!
//! ```
//! use known_types::c;
//!
//! let name = c::Str::from_bytes_with_nul(b"known\0")?;
//! assert_eq!(name.to_bytes(), b"known");
//! assert!(c::Str::from_bytes_with_nul(b"missing terminator").is_err());
//! # Ok::<(), c::FromBytesWithNulError>(())
//! ```
//#[cfg(doctest)]
//#[doc = include_str!("../README.md")]
//pub struct ReadmeDoctests;
extern crate alloc;