Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity Slicing: EntityLoader trait #1208

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cedar-policy-core/src/ast/entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,13 @@ impl Entity {
pub(crate) fn add_ancestor(&mut self, uid: EntityUID) {
self.ancestors.insert(uid);
}

/// Add a set of ancestors to this `Entity`.
/// TODO why is `add_ancestor` pub(crate) instead of pub, and should this be too?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question here on if this can be public

pub fn add_ancestors(&mut self, ancestors: HashSet<EntityUID>) {
self.ancestors.extend(ancestors);
}

/// Mark the given `UID` as an ancestor of this `Entity`
#[cfg(fuzzing)]
pub fn add_ancestor(&mut self, uid: EntityUID) {
Expand Down
Loading
Loading