Lines Matching full:safety
75 // SAFETY: This is one of the invariant of `CStr`. in len_with_nul()
92 /// # Safety
99 // SAFETY: The safety precondition guarantees `ptr` is a valid pointer in from_char_ptr()
102 // SAFETY: Lifetime guaranteed by the safety precondition. in from_char_ptr()
104 // SAFETY: As `len` is returned by `strlen`, `bytes` does not contain interior `NUL`. in from_char_ptr()
129 // SAFETY: We just checked that all properties hold. in from_bytes_with_nul()
136 /// # Safety
142 // SAFETY: Properties of `bytes` guaranteed by the safety precondition. in from_bytes_with_nul_unchecked()
185 /// # Safety
194 /// // SAFETY: String literals are guaranteed to be valid UTF-8
295 // SAFETY: We just checked the bounds. in index()
415 /// # Safety
420 // INVARIANT: The safety requirements guarantee the type invariants. in from_ptrs()
430 /// # Safety
436 // INVARIANT: We ensure that `end` is never less then `buf`, and the safety requirements in from_buffer()
468 // SAFETY: If `len_to_copy` is non-zero, then we know `pos` has not gone past `end` in write_str()
492 /// # Safety
497 // SAFETY: The safety requirements of this function satisfy those of the callee. in from_buffer()
562 // SAFETY: The buffer stored in `buf` is at least of size `size` and is valid for writes. in try_from_fmt()
567 // SAFETY: The number of bytes that can be written to `f` is bounded by `size`, which is in try_from_fmt()
572 // SAFETY: The buffer is valid for read because `f.bytes_written()` is bounded by `size` in try_from_fmt()
590 // SAFETY: The type invariants guarantee that the string is `NUL`-terminated and that no in deref()