Enum Returning
pub enum Returning {
Model {
include: Vec<Path>,
},
Changed,
Expr(Expr),
Value(Expr),
}Expand description
TODO: rename since this is also used in Select?
Variants§
Model
Return the full model with specified includes
Changed
Expr(Expr)
Return an expression.
Value(Expr)
Return a value instead of a projection of the statement source.
Implementations§
§impl Returning
impl Returning
pub fn from_expr_iter<T>(items: impl IntoIterator<Item = T>) -> Returning
pub fn is_model(&self) -> bool
pub fn as_model_includes(&self) -> &[Path]
pub fn as_model_includes_mut(&mut self) -> &mut Vec<Path>
pub fn is_changed(&self) -> bool
pub fn is_expr(&self) -> bool
pub fn as_expr(&self) -> Option<&Expr>
pub fn as_expr_unwrap(&self) -> &Expr
pub fn as_expr_mut(&mut self) -> Option<&mut Expr>
pub fn as_expr_mut_unwrap(&mut self) -> &mut Expr
pub fn set_expr(&mut self, expr: impl Into<Expr>)
pub fn is_value(&self) -> bool
Trait Implementations§
impl StructuralPartialEq for Returning
Auto Trait Implementations§
impl Freeze for Returning
impl RefUnwindSafe for Returning
impl Send for Returning
impl Sync for Returning
impl Unpin for Returning
impl UnwindSafe for Returning
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