nominal-api 0.1240.0

API bindings for the Nominal platform
Documentation
/// A prefix node collapsed across locators in the batch. `presentAtLocators` lists the
/// locators where this prefix exists, each tagged with the set of entry ids whose scope
/// expanded to that locator.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct BatchedPrefixEntry {
    #[builder(into)]
    #[serde(rename = "part")]
    part: String,
    #[builder(default, set(item(type = super::BatchedLocator)))]
    #[serde(
        rename = "presentAtLocators",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    present_at_locators: std::collections::BTreeSet<super::BatchedLocator>,
}
impl BatchedPrefixEntry {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(part: impl Into<String>) -> Self {
        Self::builder().part(part).build()
    }
    #[inline]
    pub fn part(&self) -> &str {
        &*self.part
    }
    #[inline]
    pub fn present_at_locators(
        &self,
    ) -> &std::collections::BTreeSet<super::BatchedLocator> {
        &self.present_at_locators
    }
}