boreholeio 0.1.0

A library for interacting with borehole.io, a subsurface data management, delivery and visualisation platform
Documentation
use iri_string::types::{UriFragmentStr, UriFragmentString};

pub struct Fragment(pub(super) UriFragmentString);

impl Fragment {
    pub fn as_str(&self) -> &str {
        self.0.as_str()
    }
}

impl From<&UriFragmentStr> for Fragment {
    fn from(value: &UriFragmentStr) -> Self {
        Self(value.to_owned())
    }
}

impl std::fmt::Display for Fragment {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.0)
    }
}