pub struct Surface<T> { /* private fields */ }Expand description
A set of keys the source lists, together with whether the list is
the whole truth. lookup is the only way to ask about a key: there
is no contains, iter, or Deref to the listed set, so a reader
cannot take a plain bool from an incomplete surface by accident.
Implementations§
Source§impl<T: Ord> Surface<T>
impl<T: Ord> Surface<T>
pub fn new(listed: BTreeSet<T>, unreadable: Option<Unreadable>) -> Self
Sourcepub fn lookup(&self, key: &T) -> Presence
pub fn lookup(&self, key: &T) -> Presence
With no ground, Present or Absent. With ParseTransform,
Unknowable for every key. With ExportAll or
MacroInExportList, Present for a listed key and Unknowable
otherwise: the list under-reports, it does not lie.
pub fn is_complete(&self) -> bool
Trait Implementations§
Source§impl<T> Default for Surface<T>
An empty, fully readable surface: nothing listed, nothing hidden.
impl<T> Default for Surface<T>
An empty, fully readable surface: nothing listed, nothing hidden.
impl<T: Eq> Eq for Surface<T>
impl<T: PartialEq> StructuralPartialEq for Surface<T>
Auto Trait Implementations§
impl<T> Forget for Surface<T>
impl<T> Freeze for Surface<T>
impl<T> Move for Surface<T>
impl<T> RefUnwindSafe for Surface<T>where
BTreeSet<T>: RefUnwindSafe,
impl<T> Send for Surface<T>
impl<T> Sync for Surface<T>
impl<T> Unpin for Surface<T>
impl<T> UnsafeUnpin for Surface<T>where
BTreeSet<T>: UnsafeUnpin,
impl<T> UnwindSafe for Surface<T>where
BTreeSet<T>: UnwindSafe,
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