Skip to main content

write_bound

Function write_bound 

Source
pub fn write_bound<T: Serialize + ?Sized>(
    value: &T,
    members: &'static [MemberInfo],
    out: &mut Vec<u8>,
) -> Result<Vec<(&'static MemberInfo, Value)>>
Expand description

Writes value (an input) into out as a JSON object of its body members only, and returns every bound member (label, query parameter or header) with its value: what a client needs to build the request. With a payload member, out gets that member’s bytes instead.