서로 타입이 다른 여러 변수들
예를 들면
let inst = 1
let name = "han"
...
이 변수들을 다 연결시켜서 &[u8]로 바꾸고싶은데 제일 보편적인 방법이 뭐임?
union 같은거?
예를들면 [1, 115, 97, 112] 이런식으로
protobuf 찾아보셈
https://docs.rs/bytes/latest/bytes/이거 어때
let mut bytes = BytesMut::new(); bytes.put_u8(inst); bytes.put(name.as_bytes());
다들 감사 그냥 내장된 함수로는 하기 어려운가보네
serde는 std랑 마찬가지임
직렬화 찾아보셈
union 같은거?
예를들면 [1, 115, 97, 112] 이런식으로
protobuf 찾아보셈
https://docs.rs/bytes/latest/bytes/
이거 어때
let mut bytes = BytesMut::new(); bytes.put_u8(inst); bytes.put(name.as_bytes());
다들 감사 그냥 내장된 함수로는 하기 어려운가보네
serde는 std랑 마찬가지임
직렬화 찾아보셈