greentic-component-store 0.4.76

Store abstraction and verification for Greentic components
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::StoreError;

pub fn fetch(_reference: &str) -> Result<Vec<u8>, StoreError> {
    Err(StoreError::UnsupportedScheme("warg".into()))
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn warg_fetch_is_explicitly_unimplemented() {
        let err = fetch("warg://registry.example/component@1.0.0").expect_err("warg should fail");
        assert!(matches!(err, StoreError::UnsupportedScheme(scheme) if scheme == "warg"));
    }
}