pub enum BodyOwnerKind {
ProgramRoot,
Subroutine {
name: Option<String>,
},
Method {
name: String,
},
}Expand description
What syntactic construct owns this body.
Variants§
ProgramRoot
Top-level program root (file-level statement sequence).
Subroutine
Named subroutine body (sub foo { ... }).
Method
Method body (method foo { ... }).
Trait Implementations§
Source§impl Clone for BodyOwnerKind
impl Clone for BodyOwnerKind
Source§fn clone(&self) -> BodyOwnerKind
fn clone(&self) -> BodyOwnerKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BodyOwnerKind
impl Debug for BodyOwnerKind
impl Eq for BodyOwnerKind
Source§impl Hash for BodyOwnerKind
impl Hash for BodyOwnerKind
Source§impl Ord for BodyOwnerKind
impl Ord for BodyOwnerKind
Source§fn cmp(&self, other: &BodyOwnerKind) -> Ordering
fn cmp(&self, other: &BodyOwnerKind) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for BodyOwnerKind
impl PartialEq for BodyOwnerKind
Source§fn eq(&self, other: &BodyOwnerKind) -> bool
fn eq(&self, other: &BodyOwnerKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for BodyOwnerKind
impl PartialOrd for BodyOwnerKind
impl StructuralPartialEq for BodyOwnerKind
Auto Trait Implementations§
impl Freeze for BodyOwnerKind
impl RefUnwindSafe for BodyOwnerKind
impl Send for BodyOwnerKind
impl Sync for BodyOwnerKind
impl Unpin for BodyOwnerKind
impl UnsafeUnpin for BodyOwnerKind
impl UnwindSafe for BodyOwnerKind
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