[−][src]Struct c2rust_transpile::c_ast::Qualifiers
Type qualifiers (6.7.3)
Fields
is_const: bool
The const
qualifier, which marks lvalues as non-assignable.
We make use of const
in only two places:
- Variable and function bindings (which matches up to Rust's
mut
or not bindings) - The pointed type in pointers (which matches up to Rust's
*const
/*mut
)
is_restrict: bool
is_volatile: bool
The volatile
qualifier, which prevents the compiler from reordering accesses through such
qualified lvalues past other observable side effects (other accesses, or sequence points).
The part here about not reordering (or changing in any way) access to something volatile
can be replicated in Rust via std::ptr::read_volatile
and std::ptr::write_volatile
.
Since Rust's execution model is still unclear, I am unsure that we get all of the guarantees
volatile
needs, especially regarding reordering of other side-effects.
To see where we use volatile
, check the call-sites of Translation::volatile_write
and
Translation::volatile_read
.
Methods
impl Qualifiers
[src]
pub fn and(self, other: Qualifiers) -> Qualifiers
[src]
Aggregate qualifier information from two sources.
Trait Implementations
impl Copy for Qualifiers
[src]
impl PartialEq<Qualifiers> for Qualifiers
[src]
fn eq(&self, other: &Qualifiers) -> bool
[src]
fn ne(&self, other: &Qualifiers) -> bool
[src]
impl Clone for Qualifiers
[src]
fn clone(&self) -> Qualifiers
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Qualifiers
[src]
fn default() -> Qualifiers
[src]
impl Debug for Qualifiers
[src]
Auto Trait Implementations
impl Send for Qualifiers
impl Sync for Qualifiers
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<E> SpecializationError for E
[src]
default fn not_found<S, T>(
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
[src]
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
impl<T> Erased for T
[src]
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Make for T
[src]
impl<T> MaybeResult for T
[src]
impl<'a, T> Captures for T where
T: ?Sized,
[src]
T: ?Sized,