pub trait BlockReturn: BlockReturn { }
Expand description

Trait marking types that can be returned to Ruby from a block.

Implemented for the following types:

  • T
  • Result<T, magnus::Error>

where T implements IntoValue.

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

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

Implementors§

source§

impl<T> BlockReturn for T
where T: BlockReturn,