pub struct Return { /* private fields */ }Expand description
The return statement ends function execution and specifies a value to be returned to the
function caller.
Syntax: return [expression];
expression:
The expression whose value is to be returned. If omitted,
undefinedis returned instead.
When a return statement is used in a function body, the execution of the function is
stopped. If specified, a given value is returned to the function caller.
More information:
Implementations§
Trait Implementations§
Source§impl Executable for Return
impl Executable for Return
impl StructuralPartialEq for Return
Auto Trait Implementations§
impl !Send for Return
impl !Sync for Return
impl Freeze for Return
impl RefUnwindSafe for Return
impl Unpin for Return
impl UnsafeUnpin for Return
impl UnwindSafe for Return
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