Struct debris_hir::hir_nodes::HirBlock
source · pub struct HirBlock {
pub span: Span,
pub statements: Vec<HirStatement>,
pub return_value: Option<Box<HirExpression>>,
pub objects: Vec<HirObject>,
}
Expand description
A block of code. Usually contained withing a pair of {} parenthesis.
Fields§
§span: Span
§statements: Vec<HirStatement>
The statements of this block
return_value: Option<Box<HirExpression>>
The returned value:
objects: Vec<HirObject>
The objects that got declared within this block
Implementations§
source§impl HirBlock
impl HirBlock
sourcepub fn last_item_span(&self) -> Span
pub fn last_item_span(&self) -> Span
Returns the span of the item in the block which is responsible for the return type
Trait Implementations§
source§impl PartialEq for HirBlock
impl PartialEq for HirBlock
impl Eq for HirBlock
impl StructuralEq for HirBlock
impl StructuralPartialEq for HirBlock
Auto Trait Implementations§
impl RefUnwindSafe for HirBlock
impl !Send for HirBlock
impl !Sync for HirBlock
impl Unpin for HirBlock
impl UnwindSafe for HirBlock
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.