pub trait ReturnValue: ReturnValue { }
Expand description

Trait marking types that can be returned to Ruby.

Implemented for the following types:

where I implements Iterator<Item = T> and T implements IntoValue.

When is Err(magnus::Error) returned to Ruby it will be conveted to and raised as a Ruby exception.

Yield, YieldValues, and YieldSplat allow returning a Rust Iterator to be bridged to Ruby method that calls a block with the elements of that Iterator.

Note: functions without a specified return value will return (). () implements IntoValue (converting to nil).

Implementors§

source§

impl<T> ReturnValue for Twhere T: ReturnValue,