@@ -105,13 +105,12 @@ impl Entity {
105
105
}
106
106
107
107
/// Create a new `Entity` with this Uid, parents, and no attributes.
108
- /// This is the same as `Self::new` except the attributes are empty, and therefor it can
108
+ /// This is the same as `Self::new` except the attributes are empty, and therefore it can
109
109
/// return `Self` instead of `Result<Self>`
110
110
pub fn new_empty_attrs ( uid : EntityUid , parents : HashSet < EntityUid > ) -> Self {
111
111
Self ( ast:: Entity :: new_empty_attrs (
112
112
uid. into ( ) ,
113
113
parents. into_iter ( ) . map ( EntityUid :: into) . collect ( ) ,
114
- Extensions :: all_available ( ) ,
115
114
) )
116
115
}
117
116
@@ -356,9 +355,9 @@ impl Entities {
356
355
/// error if attributes have the wrong types (e.g., string instead of
357
356
/// integer), or if required attributes are missing or superfluous
358
357
/// attributes are provided.
359
- /// # Errors
360
- /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entiites `
361
- /// - [`EntitiesError::InvalidEntity` if `schema` is not none and any entities do not conform
358
+ /// ## Errors
359
+ /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entities `
360
+ /// - [`EntitiesError::InvalidEntity`] if `schema` is not none and any entities do not conform
362
361
/// to the schema
363
362
pub fn from_entities (
364
363
entities : impl IntoIterator < Item = Entity > ,
@@ -386,9 +385,9 @@ impl Entities {
386
385
///
387
386
/// Re-computing the transitive closure can be expensive, so it is advised
388
387
/// to not call this method in a loop.
389
- /// # Errors
390
- /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entiites `
391
- /// - [`EntitiesError::InvalidEntity` if `schema` is not none and any entities do not conform
388
+ /// ## Errors
389
+ /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entities `
390
+ /// - [`EntitiesError::InvalidEntity`] if `schema` is not none and any entities do not conform
392
391
/// to the schema
393
392
pub fn add_entities (
394
393
self ,
@@ -420,9 +419,9 @@ impl Entities {
420
419
///
421
420
/// Re-computing the transitive closure can be expensive, so it is advised
422
421
/// to not call this method in a loop.
423
- /// # Errors
424
- /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entiites `
425
- /// - [`EntitiesError::InvalidEntity` if `schema` is not none and any entities do not conform
422
+ /// ## Errors
423
+ /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entities `
424
+ /// - [`EntitiesError::InvalidEntity`] if `schema` is not none and any entities do not conform
426
425
/// to the schema
427
426
/// - [`EntitiesError::Deserialization`] if there are errors while parsing the json
428
427
pub fn add_entities_from_json_str (
@@ -458,9 +457,9 @@ impl Entities {
458
457
///
459
458
/// Re-computing the transitive closure can be expensive, so it is advised
460
459
/// to not call this method in a loop.
461
- /// # Errors
462
- /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entiites `
463
- /// - [`EntitiesError::InvalidEntity` if `schema` is not none and any entities do not conform
460
+ /// ## Errors
461
+ /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entities `
462
+ /// - [`EntitiesError::InvalidEntity`] if `schema` is not none and any entities do not conform
464
463
/// to the schema
465
464
/// - [`EntitiesError::Deserialization`] if there are errors while parsing the json
466
465
pub fn add_entities_from_json_value (
@@ -497,9 +496,9 @@ impl Entities {
497
496
/// Re-computing the transitive closure can be expensive, so it is advised
498
497
/// to not call this method in a loop.
499
498
///
500
- /// # Errors
501
- /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entiites `
502
- /// - [`EntitiesError::InvalidEntity` if `schema` is not none and any entities do not conform
499
+ /// ## Errors
500
+ /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entities `
501
+ /// - [`EntitiesError::InvalidEntity`] if `schema` is not none and any entities do not conform
503
502
/// to the schema
504
503
/// - [`EntitiesError::Deserialization`] if there are errors while parsing the json
505
504
pub fn add_entities_from_json_file (
@@ -539,9 +538,9 @@ impl Entities {
539
538
/// instead of integer), or if required attributes are missing or
540
539
/// superfluous attributes are provided.
541
540
///
542
- /// # Errors
543
- /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entiites `
544
- /// - [`EntitiesError::InvalidEntity` if `schema` is not none and any entities do not conform
541
+ /// ## Errors
542
+ /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entities `
543
+ /// - [`EntitiesError::InvalidEntity`] if `schema` is not none and any entities do not conform
545
544
/// to the schema
546
545
/// - [`EntitiesError::Deserialization`] if there are errors while parsing the json
547
546
///
@@ -600,9 +599,9 @@ impl Entities {
600
599
/// instead of integer), or if required attributes are missing or
601
600
/// superfluous attributes are provided.
602
601
///
603
- /// # Errors
604
- /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entiites `
605
- /// - [`EntitiesError::InvalidEntity` if `schema` is not none and any entities do not conform
602
+ /// ## Errors
603
+ /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entities `
604
+ /// - [`EntitiesError::InvalidEntity`] if `schema` is not none and any entities do not conform
606
605
/// to the schema
607
606
/// - [`EntitiesError::Deserialization`] if there are errors while parsing the json
608
607
///
@@ -658,9 +657,9 @@ impl Entities {
658
657
/// instead of integer), or if required attributes are missing or
659
658
/// superfluous attributes are provided.
660
659
///
661
- /// # Errors
662
- /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entiites `
663
- /// - [`EntitiesError::InvalidEntity` if `schema` is not none and any entities do not conform
660
+ /// ## Errors
661
+ /// - [`EntitiesError::Duplicate`] if there are any duplicate entities in `entities `
662
+ /// - [`EntitiesError::InvalidEntity`] if `schema` is not none and any entities do not conform
664
663
/// to the schema
665
664
/// - [`EntitiesError::Deserialization`] if there are errors while parsing the json
666
665
pub fn from_json_file (
@@ -1545,7 +1544,7 @@ impl Schema {
1545
1544
1546
1545
/// Returns an iterator over every entity type that can be a principal for `action` in this schema
1547
1546
///
1548
- /// # Errors
1547
+ /// ## Errors
1549
1548
///
1550
1549
/// Returns [`None`] if `action` is not found in the schema
1551
1550
pub fn principals_for_action (
@@ -1559,7 +1558,7 @@ impl Schema {
1559
1558
1560
1559
/// Returns an iterator over every entity type that can be a resource for `action` in this schema
1561
1560
///
1562
- /// # Errors
1561
+ /// ## Errors
1563
1562
///
1564
1563
/// Returns [`None`] if `action` is not found in the schema
1565
1564
pub fn resources_for_action (
@@ -1573,7 +1572,7 @@ impl Schema {
1573
1572
1574
1573
/// Returns an iterator over all the entity types that can be an ancestor of `ty`
1575
1574
///
1576
- /// # Errors
1575
+ /// ## Errors
1577
1576
///
1578
1577
/// Returns [`None`] if the `ty` is not found in the schema
1579
1578
pub fn ancestors < ' a > (
0 commit comments