set_string

Function set_string 

Source
pub unsafe fn set_string(
    buf: &mut Vec<u8>,
    table_loc: usize,
    field: &Field<'_>,
    v: &str,
    schema: &Schema<'_>,
) -> FlatbufferResult<()>
Expand description

Sets a string field to a new value. Returns error if the field is not originally set or is not of string type in which cases the [buf] stays intact. Returns error if the [buf] fails to be updated.

ยงSafety

[buf] must contain a valid root table and valid offset to it and conform to the [schema].