pub struct PropertyEnumeration { /* private fields */ }Expand description
Every property an enumeration request selects, exactly, with the evidence that nothing else is selected.
Properties are sorted by set and name; no set and name occurs twice. An
empty enumeration is an exact proof that the object has no selected
property, as CompletePropertyAbsenceEvidence is for one name.
A set the object carries without any member holds no property, so it
leaves no trace among the properties. A source that can tell such a set
apart from no set at all names it in Self::empty_sets, so a rule
requiring a property in every selected set fails on it, as IDS requires.
Implementations§
Source§impl PropertyEnumeration
impl PropertyEnumeration
Sourcepub fn try_new(
request: PropertyEnumerationRequest,
properties: Vec<Property>,
evidence: Evidence,
) -> Result<Self, PropertyResolutionError>
pub fn try_new( request: PropertyEnumerationRequest, properties: Vec<Property>, evidence: Evidence, ) -> Result<Self, PropertyResolutionError>
Creates a request-bound enumeration.
§Errors
PropertyResolutionError::InexactEvidence when the completeness
evidence or a property’s evidence is not exact, reviewable and from
the object’s source; PropertyResolutionError::ResponseRequestMismatch
for a property the request does not select;
PropertyResolutionError::InvalidValue for an invalid value; and
PropertyResolutionError::Conflicting when a set and name occur
twice.
Sourcepub fn with_empty_sets(
self,
sets: impl IntoIterator<Item = String>,
) -> Result<Self, PropertyResolutionError>
pub fn with_empty_sets( self, sets: impl IntoIterator<Item = String>, ) -> Result<Self, PropertyResolutionError>
The same enumeration, also naming the selected sets the object carries without any member, sorted and each once.
§Errors
PropertyResolutionError::ResponseRequestMismatch for a set the
request does not select, or of a reserved name; and
PropertyResolutionError::Conflicting for a set an enumerated
property is in, which is not empty.
Sourcepub fn request(&self) -> &PropertyEnumerationRequest
pub fn request(&self) -> &PropertyEnumerationRequest
Bound request.
Sourcepub fn properties(&self) -> &[Property]
pub fn properties(&self) -> &[Property]
The selected properties, sorted by set and name.
Sourcepub fn evidence(&self) -> &Evidence
pub fn evidence(&self) -> &Evidence
Exact reviewable evidence that the enumeration is complete.
Sourcepub fn empty_sets(&self) -> &[String]
pub fn empty_sets(&self) -> &[String]
The selected sets the object carries without any member, sorted. The same evidence proves there are no others; a source that cannot tell an empty set from none reports none.