pub enum StmtShape {
Let {
init: ExprShape,
},
MutCall {
receiver: Option<LocalSlot>,
callee: CalleeShape,
},
}Expand description
A normalized statement shape used for paragraph grouping.
Variants§
Let
A let statement represented by its initializer shape.
MutCall
A mutating call, optionally tied to a normalized local receiver slot.
Implementations§
Source§impl StmtShape
impl StmtShape
Sourcepub const fn let_binding(init: ExprShape) -> Self
pub const fn let_binding(init: ExprShape) -> Self
Builds a let statement shape from its initializer.
§Examples
use whitaker_common::rstest::{ExprShape, StmtShape};
assert_eq!(
StmtShape::let_binding(ExprShape::lit()),
StmtShape::Let { init: ExprShape::Lit },
);Sourcepub const fn mutable_call(
receiver: Option<LocalSlot>,
callee: CalleeShape,
) -> Self
pub const fn mutable_call( receiver: Option<LocalSlot>, callee: CalleeShape, ) -> Self
Builds a mutating-call statement shape.
Trait Implementations§
impl Eq for StmtShape
impl StructuralPartialEq for StmtShape
Auto Trait Implementations§
impl Freeze for StmtShape
impl RefUnwindSafe for StmtShape
impl Send for StmtShape
impl Sync for StmtShape
impl Unpin for StmtShape
impl UnsafeUnpin for StmtShape
impl UnwindSafe for StmtShape
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