pub struct Allowlist { /* private fields */ }Expand description
Intended removals and renames, at most one for each old ID.
Implementations§
Source§impl Allowlist
impl Allowlist
Sourcepub fn read(path: &Path) -> Result<Self, AllowlistError>
pub fn read(path: &Path) -> Result<Self, AllowlistError>
Reads an allowlist file of at most the format’s 64 MiB input limit.
§Errors
Returns the first problem: an unreadable or oversized file, text
that is not UTF-8, or any problem Allowlist::parse reports.
Sourcepub fn parse(text: &str) -> Result<Self, AllowlistError>
pub fn parse(text: &str) -> Result<Self, AllowlistError>
Parses an allowlist document: strict JSONC with exactly the keys of
docs/spec/DIFF.md, kinds and IDs written as the kinds require, and
at most one entry for each old ID.
§Errors
Returns the first problem found.
Sourcepub fn allowances(&self) -> impl Iterator<Item = Allowance> + '_
pub fn allowances(&self) -> impl Iterator<Item = Allowance> + '_
Every entry, sorted by kind and old ID.
Trait Implementations§
impl Eq for Allowlist
impl StructuralPartialEq for Allowlist
Auto Trait Implementations§
impl Forget for Allowlist
impl Freeze for Allowlist
impl Move for Allowlist
impl RefUnwindSafe for Allowlist
impl Send for Allowlist
impl Sync for Allowlist
impl Unpin for Allowlist
impl UnsafeUnpin for Allowlist
impl UnwindSafe for Allowlist
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more