RBasic

Struct RBasic 

Source
#[repr(C)]
pub struct RBasic { pub flags: VALUE, pub klass: VALUE, }
Expand description

§Ruby’s object’s, base components. Every single ruby objects have them in common.

Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3

Fields§

§flags: VALUE

Per-object flags. Each ruby objects have their own characteristics apart from their classes. For instance whether an object is frozen or not is not controlled by its class. This is where such properties are stored.

@see enum ::ruby_fl_type

§@note This is ::VALUE rather than an enum for alignment purpose. Back in the 1990s there were no such thing like _Alignas in C.

Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3

§klass: VALUE

Class of an object. Every object has its class. Also, everything is an object in Ruby. This means classes are also objects. Classes have their own classes, classes of classes have their classes, too … and it recursively continues forever.

§Also note the const qualifier. In ruby an object cannot “change” its class.

Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3

Trait Implementations§

Source§

impl Clone for RBasic

Source§

fn clone(&self) -> RBasic

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RBasic

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for RBasic

Source§

fn eq(&self, other: &RBasic) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for RBasic

Source§

impl Eq for RBasic

Source§

impl StructuralPartialEq for RBasic

Auto Trait Implementations§

§

impl Freeze for RBasic

§

impl RefUnwindSafe for RBasic

§

impl Send for RBasic

§

impl Sync for RBasic

§

impl Unpin for RBasic

§

impl UnwindSafe for RBasic

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.