pub enum TempState {
Undefined,
Defined {
location: Location,
uses: usize,
},
Unpromotable,
PromotedOut,
}Expand description
State of a temporary during collection and promotion.
Variants
Undefined
No references to this temp.
Defined
One direct assignment and any number of direct uses. A borrow of this temp is promotable if the assigned value is qualified as constant.
Unpromotable
Any other combination of assignments/uses.
PromotedOut
This temp was part of an rvalue which got extracted during promotion and needs cleanup.
Implementations
sourceimpl TempState
impl TempState
pub fn is_promotable(&self) -> bool
Trait Implementations
impl Copy for TempState
impl Eq for TempState
impl StructuralEq for TempState
impl StructuralPartialEq for TempState
Auto Trait Implementations
impl RefUnwindSafe for TempState
impl Send for TempState
impl Sync for TempState
impl Unpin for TempState
impl UnwindSafe for TempState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
Undefined: 0 bytesDefined: 24 bytesUnpromotable: 0 bytesPromotedOut: 0 bytes