Skip to main content

Crate known_types

Crate known_types 

Source
Expand description

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 and 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());

Modulesยง

c
handle
Shared validation and errors for social media handles.