pub enum ItemOpacity {
Transparent,
Foreign,
Opaque,
Invisible,
}
Variants§
Transparent
Translate the item fully.
Foreign
Translate the item depending on the normal rust visibility of its contents: for types, we
translate fully if it is a struct with public fields or an enum; for functions and globals
this is equivalent to Opaque
; for trait decls and impls this is equivalent to
Transparent
.
Opaque
Translate the item name and signature, but not its contents. For function and globals, this means we don’t translate the body (the code); for ADTs, this means we don’t translate the fields/variants. For traits and trait impls, this doesn’t change anything. For modules, this means we don’t explore its contents (we still translate any of its items mentioned from somewhere else).
This can happen either if the item was annotated with #[charon::opaque]
or if it was
declared opaque via a command-line argument.
Invisible
Translate nothing of this item. The corresponding map will not have an entry for the
AnyTransId
. Useful when even the signature of the item causes errors.
Implementations§
source§impl ItemOpacity
impl ItemOpacity
pub fn is_transparent(&self) -> bool
pub fn is_foreign(&self) -> bool
pub fn is_opaque(&self) -> bool
pub fn is_invisible(&self) -> bool
source§impl ItemOpacity
impl ItemOpacity
pub fn with_content_visibility(self, contents_are_public: bool) -> Self
pub fn with_private_contents(self) -> Self
Trait Implementations§
source§impl Clone for ItemOpacity
impl Clone for ItemOpacity
source§fn clone(&self) -> ItemOpacity
fn clone(&self) -> ItemOpacity
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ItemOpacity
impl Debug for ItemOpacity
source§impl<'de> Deserialize<'de> for ItemOpacity
impl<'de> Deserialize<'de> for ItemOpacity
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Ord for ItemOpacity
impl Ord for ItemOpacity
source§fn cmp(&self, other: &ItemOpacity) -> Ordering
fn cmp(&self, other: &ItemOpacity) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ItemOpacity
impl PartialEq for ItemOpacity
source§impl PartialOrd for ItemOpacity
impl PartialOrd for ItemOpacity
source§impl Serialize for ItemOpacity
impl Serialize for ItemOpacity
impl Copy for ItemOpacity
impl Eq for ItemOpacity
impl StructuralPartialEq for ItemOpacity
Auto Trait Implementations§
impl Freeze for ItemOpacity
impl RefUnwindSafe for ItemOpacity
impl Send for ItemOpacity
impl Sync for ItemOpacity
impl Unpin for ItemOpacity
impl UnwindSafe for ItemOpacity
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more