pub fn to_bytes_for_signature<'s, S, T>(
    ctxt: Context,
    signature: S,
    value: &T
) -> Result<Data<'static, 'static>>
where S: TryInto<Signature<'s>>, S::Error: Into<Error>, T: Serialize + ?Sized,
Expand description

Serialize T that has the given signature, to a new byte vector.

Use this function instead of to_bytes if the value being serialized does not implement DynamicType. See from_slice_for_signature documentation for an example of how to use this function.