Docs.rs
  • go-vm-0.1.0
    • go-vm 0.1.0
    • Docs.rs crate page
    • BSD-2-Clause
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • oxfeeefeee
    • Dependencies
      • async-channel ^1.6.1 normal
      • async-executor ^1.4.1 normal
      • borsh ^0.9.3 normal
      • fastrand ^1.9.0 normal
      • futures-lite ^1.12.0 normal
      • go-parser ^0.1.0 normal
      • go-pmacro ^0.1.0 normal
      • ordered-float ^3.0 normal
      • time-test ^0.2.2 dev
    • Versions
    • 11.11% of the crate is documented
  • Go to latest version
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Badges
    • Builds
    • Metadata
    • Shorthand URLs
    • Download
    • Rustdoc JSON
    • Build queue
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation
logo

logo

StringObj

Methods

  • add
  • as_str
  • index
  • index_elem_u8
  • with_str

In go_vm::types

?
Change settings

Type Definition go_vm::types::StringObj

source ·
pub type StringObj = SliceObj<Elem8>;

Implementations§

source§

impl StringObj

source

pub fn with_str(s: &str) -> StringObj

source

pub fn as_str(&self) -> Ref<'_, str>

It’s safe because strings are readonly https://stackoverflow.com/questions/50431702/is-it-safe-and-defined-behavior-to-transmute-between-a-t-and-an-unsafecellt https://doc.rust-lang.org/src/core/str/converts.rs.html#173

source

pub fn index(&self, i: usize) -> RuntimeResult<GosValue>

source

pub fn index_elem_u8(&self, i: usize) -> u8

source

pub fn add(&self, other: &StringObj) -> StringObj