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,
undefined
is 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
sourceimpl Executable for Return
impl Executable for Return
sourceimpl Trace for Return
impl Trace for Return
sourcefn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects Read more
impl StructuralPartialEq for Return
Auto Trait Implementations
impl RefUnwindSafe for Return
impl !Send for Return
impl !Sync for Return
impl Unpin for Return
impl UnwindSafe for Return
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more