Trait magnus::value::IntoId

source ·
pub trait IntoId: Sized {
    // Required method
    fn into_id_with(self, handle: &Ruby) -> Id;

    // Provided methods
    fn into_id(self) -> Id { ... }
    unsafe fn into_id_unchecked(self) -> Id { ... }
}
Expand description

Conversions from Rust types into Id.

Required Methods§

source

fn into_id_with(self, handle: &Ruby) -> Id

Convert self into Id.

Provided Methods§

source

fn into_id(self) -> Id

Convert self into Id.

§Panics

Panics if called from a non-Ruby thread. See IntoId::into_id_with for the non-panicking version.

source

unsafe fn into_id_unchecked(self) -> Id

Convert self into Id.

§Safety

This method should only be called from a Ruby thread.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl IntoId for &str

source§

fn into_id_with(self, handle: &Ruby) -> Id

source§

impl IntoId for String

source§

fn into_id_with(self, handle: &Ruby) -> Id

Implementors§