ic-backup 0.7.0

Host-side snapshot backup and same-release recovery for Internet Computer canisters
Documentation
1
2
3
4
5
6
7
8
9
10
//! Pure bounded principal text admission shared by owning record boundaries.

pub(super) fn canonical_text(value: &str) -> Option<String> {
    if value.len() > 63 {
        return None;
    }
    ic_principal::Principal::from_text(value)
        .ok()
        .map(|principal| principal.to_text())
}