Skip to main content

Module public_types

Module public_types 

Source
Expand description

The source scan behind plan section 3.16’s rule: every public struct, enum, union, trait and type alias of a crate is asserted Send + Sync (an alias too: pub type Shared = Rc<u8> is a public type a caller holds, and round 5 found the scan blind to it).

A type is named by its full module path (files::bundle::BundleFile), taken from its file’s place under src/ and any pub mod name { … } it sits in; items in a private inline module (mod tests { … }) are not public. An assertion is any send_sync::<Path>() in any file of the crate: a crate:: path, or a path relative to the file’s module (so lib.rs names files::bundle::BundleFile, and files/bundle/mod.rs may say crate::send_sync::<BundleFile>() next to the type). A re-export does not count, so a new type that shares a name with an asserted one is still caught. Comments and string literals are blanked before the scan, so an assertion written in a trailing comment, a block comment or a string (none of which Rust compiles) asserts nothing (round 6).

Owner: the scaffold (implemented).

Functions§

unasserted
The public types under src that no assertion names, as full paths.