pub enum Message {
Normal(Vec<u8>),
Flush,
Delimeter,
ResponseEnd,
PackStart,
PackData(Vec<u8>),
PackProgress(String),
PackError(String),
}Expand description
Message abstracts the type of information you may receive from a Git server.
Variants§
Normal(Vec<u8>)
Flush
0000 Flush Packet(flush-pkt)
Indicates the end of a message
Delimeter
0001 Delimeter Packet(delim-pkt)
Separates sections of a message
ResponseEnd
0002 Response End Packet(response-end-pkg)
Indicates the end of a response for stateless connections
PackStart
Received when data is packfile\n
After this message, only Pack.+ messages would be sent
There is a byte at the beginning of all Pack.+ messages except PackStart
The stream code can be one of:
1 - pack data
2 - progress messages
3 - fatal error message just before stream aborts
PackData(Vec<u8>)
Received after Message::PackStart when stream code is 1
Data of PACK file
PackProgress(String)
Received after Message::PackStart when stream code is 2
Progress messages of the transfer
PackError(String)
Received after Message::PackStart when stream code is 3
Fatal error message