pub fn encode_ids(
ids: impl IntoIterator<Item = impl Deref<Target = Id>>,
) -> Vec<Bytes>Expand description
Encode a list of typed IDs into a list of bytes.
ยงExample
For example, a list of AgentIds can be encoded into a list of bytes.
use bytes::Bytes;
use kitsune2_api::{AgentId, encode_ids};
let agents = vec![
AgentId::from(Bytes::from_static(b"agent1")),
AgentId::from(Bytes::from_static(b"agent2")),
];
let encoded_agents = encode_ids(agents);