pub fn encode_subnet_canister_ranges(ranges: Option<&Vec<(PrincipalId, PrincipalId)>>) -> Vec<u8> {
    let mut serializer = serde_cbor::Serializer::new(vec![]);
    serializer.self_describe().unwrap();
    match ranges {
        Some(ranges) => ranges.serialize(&mut serializer).unwrap(),
        None => Vec::<(PrincipalId, PrincipalId)>::new()
            .serialize(&mut serializer)
            .unwrap(),
    }
    serializer.into_inner()
}
/// Encodes the list of canister ID ranges assigned to a subnet according to
/// the interface specification.
///
/// See https://sdk.dfinity.org/docs/interface-spec/index.html#state-tree-subnet
Encodes the list of canister ID ranges assigned to a subnet according to
the interface specification.


Encodes the list of canister ID ranges assigned to a subnet according to the interface specification .
pub fn encode_subnet_canister_ranges(ranges: Option<&Vec<(PrincipalId, PrincipalId)>>) -> Vec<u8> {
    let mut serializer = serde_cbor::Serializer::new(vec![]);
    serializer.self_describe().unwrap();
    match ranges {
        Some(ranges) => ranges.serialize(&mut serializer).unwrap(),
        None => Vec::<(PrincipalId, PrincipalId)>::new()
            .serialize(&mut serializer)
            .unwrap(),
    }
    serializer.into_inner()
}
pub fn encode_subnet_canister_ranges ( ranges : Option < & Vec < ( PrincipalId , PrincipalId ) > > ) -> Vec < u8 > { let mut serializer = serde_cbor :: Serializer :: new ( vec ! [ ] ) ; serializer . self_describe ( ) . unwrap ( ) ; match ranges { Some ( ranges ) => ranges . serialize ( & mut serializer ) . unwrap ( ) , None => Vec :: < ( PrincipalId , PrincipalId ) > :: new ( ) . serialize ( & mut serializer ) . unwrap ( ) , } serializer . into_inner ( ) }
Encodes the list of canister ID ranges assigned to a subnet according to
the interface specification.
Encodes the list of canister ID ranges assigned to a subnet according to the interface specification .
ranges
Option<&Vec<(PrincipalId, PrincipalId)>>
ranges
Option<&Vec<(PrincipalId, PrincipalId)>>