extract_safety_doc

Function extract_safety_doc 

Source
pub fn extract_safety_doc(doc: &str) -> Option<String>
Expand description

Extract the # Safety or ## Safety section from a Rust doc comment string.

The doc parameter should be the concatenation of all #[doc = "..."] attribute values joined by newlines, as returned by attr.doc_str().

Returns the text of the Safety section (with leading/trailing whitespace trimmed), or None if no Safety section is present.