Struct rutie::Symbol[][src]

pub struct Symbol { /* fields omitted */ }

Symbol

Methods

impl Symbol
[src]

Creates a new instance of Ruby Symbol.

Examples

use rutie::{Symbol, VM};

let symbol = Symbol::new("hello");

assert_eq!(symbol.to_str(), "hello");

Ruby:

sym = :hello

sym.to_s == 'hello'

Retrieves the Rust &str corresponding to Symbol object (Ruby Symbol#to_s).

Examples

use rutie::{Symbol, VM};

let symbol = Symbol::new("hello");

assert_eq!(symbol.to_str(), "hello");

Ruby:

sym = :hello

sym.to_s == 'hello'

Retrieves the Rust String corresponding to Symbol object (Ruby Symbol#to_s).

Examples

use rutie::{Symbol, VM};

let symbol = Symbol::new("hello");

assert_eq!(symbol.to_string(), "hello");

Ruby:

sym = :hello

sym.to_s == 'hello'

Trait Implementations

impl Debug for Symbol
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Symbol
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl From<Value> for Symbol
[src]

Performs the conversion.

impl Object for Symbol
[src]

Returns internal value of current object. Read more

Returns a class of current object. Read more

Returns a singleton class of current object. Read more

Important traits for &'a mut R

Gets an immutable reference to the Rust structure which is wrapped into a Ruby object. Read more

Important traits for &'a mut R

Gets a mutable reference to the Rust structure which is wrapped into a Ruby object.

Important traits for &'a mut R

Wraps calls to the object. Read more

Defines an instance method for the given class or object. Read more

Defines a private instance method for the given class or object. Read more

Defines a class method for given class or singleton method for object. Read more

An alias for define_method (similar to Ruby syntax def some_method).

An alias for define_private_method (similar to Ruby syntax private def some_method).

An alias for define_singleton_method (similar to Ruby def self.some_method).

Calls a given method on an object similarly to Ruby Object#send method Read more

Alias for Ruby's == Read more

Alias for Ruby's === Read more

Alias for Ruby's eql? Read more

Alias for Ruby's equal? Read more

Checks whether the object responds to given method Read more

protect_send returns Result<AnyObject, AnyObject> Read more

protect_public_send returns Result<AnyObject, AnyObject> Read more

Checks whether the object is nil Read more

Converts struct to AnyObject Read more

Gets an instance variable of object Read more

Sets an instance variable for object Read more

Returns the freeze status of the object. Read more

Prevents further modifications to the object. Read more

Unsafely casts current object to the specified Ruby type Read more

Safely casts current object to the specified Ruby type Read more

Determines the value type of the object Read more

impl VerifiedObject for Symbol
[src]

Auto Trait Implementations

impl Send for Symbol

impl Sync for Symbol