pub struct Body<S> {
pub statements: Vec<Terminated<S>>,
pub tail: Option<S>,
}Expand description
Statements discarded by semicolons followed by an optional returned tail.
This is analogous to a Rust block: every terminated statement is evaluated for effects, while the unterminated tail supplies the body’s value.
Fields§
§statements: Vec<Terminated<S>>§tail: Option<S>Implementations§
Trait Implementations§
impl<S: Eq> Eq for Body<S>
Source§impl<S: Parse> Parse for Body<S>
impl<S: Parse> Parse for Body<S>
fn parse(input: &mut ParseStream) -> Result<Self, TokenParseError>
impl<S: PartialEq> StructuralPartialEq for Body<S>
Auto Trait Implementations§
impl<S> Freeze for Body<S>where
S: Freeze,
impl<S> RefUnwindSafe for Body<S>where
S: RefUnwindSafe,
impl<S> Send for Body<S>where
S: Send,
impl<S> Sync for Body<S>where
S: Sync,
impl<S> Unpin for Body<S>where
S: Unpin,
impl<S> UnsafeUnpin for Body<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for Body<S>where
S: UnwindSafe,
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