Struct yksom::vm::objects::String_ [−][src]
pub struct String_ { /* fields omitted */ }
Implementations
impl String_
[src]
pub fn new_str(vm: &mut VM, s: SmartString) -> Val
[src]
pub fn new_sym(vm: &mut VM, s: SmartString) -> Val
[src]
pub fn symbol_to_string_(
vm: &mut VM,
v: Val
) -> Result<Gc<String_>, Box<VMError>>
[src]
vm: &mut VM,
v: Val
) -> Result<Gc<String_>, Box<VMError>>
If the value v
represents a String_
which is an instance of the SOM Symbol
class (and
not the SOM String
class!), return a reference to the underlying String_
or an
InstanceTypeError
otherwise.
pub fn as_str(&self) -> &str
[src]
pub fn concatenate(
self: Gc<Self>,
vm: &mut VM,
other: Val
) -> Result<Val, Box<VMError>>
[src]
self: Gc<Self>,
vm: &mut VM,
other: Val
) -> Result<Val, Box<VMError>>
Concatenate this string with another string and return the result.
pub fn substring(
&self,
vm: &mut VM,
start: usize,
end: usize
) -> Result<Val, Box<VMError>>
[src]
&self,
vm: &mut VM,
start: usize,
end: usize
) -> Result<Val, Box<VMError>>
pub fn to_string_(&self, vm: &mut VM) -> Result<Val, Box<VMError>>
[src]
pub fn to_symbol(&self, vm: &mut VM) -> Result<Val, Box<VMError>>
[src]
pub fn set_cls(&self, cls: Val)
[src]
Trait Implementations
impl Debug for String_
[src]
impl NotUnboxable for String_
[src]
impl Obj for String_
[src]
fn dyn_objtype(self: Gc<Self>) -> ObjType
[src]
fn get_class(self: Gc<Self>, _: &mut VM) -> Val
[src]
fn to_strval(self: Gc<Self>, _: &mut VM) -> Result<Val, Box<VMError>>
[src]
fn hashcode(self: Gc<Self>) -> u64
[src]
fn length(self: Gc<Self>) -> usize
[src]
fn ref_equals(
self: Gc<Self>,
vm: &mut VM,
other: Val
) -> Result<Val, Box<VMError>>
[src]
self: Gc<Self>,
vm: &mut VM,
other: Val
) -> Result<Val, Box<VMError>>
fn equals(self: Gc<Self>, vm: &mut VM, other: Val) -> Result<Val, Box<VMError>>
[src]
fn to_array(self: Gc<Self>) -> Result<Gc<dyn Array>, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn num_inst_vars(self: Gc<Self>, _: &VM) -> usize where
Self: Send,
[src]
Self: Send,
fn inst_var_at(self: Gc<Self>, vm: &VM, i: usize) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn inst_var_at_put(
self: Gc<Self>,
vm: &VM,
i: usize,
v: Val
) -> Result<(), Box<VMError>> where
Self: Send,
[src]
self: Gc<Self>,
vm: &VM,
i: usize,
v: Val
) -> Result<(), Box<VMError>> where
Self: Send,
unsafe fn unchecked_inst_var_get(self: Gc<Self>, _: &VM, _: usize) -> Val where
Self: Send,
[src]
Self: Send,
unsafe fn unchecked_inst_var_set(self: Gc<Self>, _: &VM, _: usize, _: Val) where
Self: Send,
[src]
Self: Send,
fn add(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn and(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn div(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn double_div(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn modulus(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn mul(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn remainder(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn shl(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn shr(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn sqrt(self: Gc<Self>, _: &mut VM) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn sub(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn xor(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn not_equals(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn greater_than(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn greater_than_equals(
self: Gc<Self>,
_: &mut VM,
_: Val
) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
self: Gc<Self>,
_: &mut VM,
_: Val
) -> Result<Val, Box<VMError>> where
Self: Send,
fn less_than(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn less_than_equals(
self: Gc<Self>,
_: &mut VM,
_: Val
) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
self: Gc<Self>,
_: &mut VM,
_: Val
) -> Result<Val, Box<VMError>> where
Self: Send,
impl StaticObjType for String_
[src]
fn static_objtype() -> ObjType
[src]
Auto Trait Implementations
impl !NoTrace for String_
impl !RefUnwindSafe for String_
impl Send for String_
impl !Sync for String_
impl Unpin for String_
impl UnwindSafe for String_
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,