[−][src]Function pre::alloc::string::String__impl__as_mut_vec__
pub fn String__impl__as_mut_vec__()
A stub for the preconditions of the alloc_lib::string::String::as_mut_vec
function.
What is this function?
This function was generated by an impl
block inside a extern_crate
attribute that looked like this:
ⓘThis example is not tested
impl String { unsafe fn as_mut_vec(& mut self) -> & mut Vec < u8 >; /* other items omitted */ }
Preconditions on external functions inside of an impl
block are attached to empty functions like this one.
When the preconditions should be checked, a call to this function is inserted, which triggers checking the preconditions.
This function has preconditions
This function has the following precondition generated by the pre
attribute:
- the content of the
Vec
is valid UTF-8 at the time the reference is dropped
To call the function you need to assure
that the precondition holds:
ⓘThis example is not tested
#[forward(impl pre::alloc::string::String)] #[assure( "the content of the `Vec` is valid UTF-8 at the time the reference is dropped", reason = "<specify the reason why you can assure this here>" )] x.as_mut_vec(/* parameters omitted */);