#[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 {
#[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
}
}