Skip to main content

v1_advertisement_payload

Function v1_advertisement_payload 

Source
pub fn v1_advertisement_payload(head: &str, caps: &[impl AsRef<str>]) -> Vec<u8> ⓘ
Expand description

Payload (not yet length-prefixed) of a v1 first-ref / capabilities^{} line.

Shape from gitprotocol-capabilities / gitprotocol-pack: head NUL capability-list LF. head is caller-supplied (obj-id SP refname, or zero-id SP capabilities^{}). The capability list is advertise_capabilities; this function adds no names.