pub struct JsString { /* fields omitted */ }
Expand description
This represents a JavaScript primitive string.
This is similar to Rc<str>
. But unlike Rc<str>
which stores the length
on the stack and a pointer to the data (this is also known as fat pointers).
The JsString
length and data is stored on the heap. and just an non-null
pointer is kept, so its size is the size of a pointer.
Create an empty string, same as calling default.
Create a new JavaScript string.
Concatenate array of string.
Return the JavaScript string as a rust &str
.
Gets the number of JsString
s which point to this allocation.
Returns true
if the two JsString
s point to the same allocation (in a vein similar to ptr::eq
).
Immutably borrows from an owned value. Read more
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
The resulting type after dereferencing.
Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
Increments the root-count of all contained Gc
s.
Decrements the root-count of all contained Gc
s.
Runs Finalize::finalize() on this object and all
contained subobjects Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
impl<T, U> Into<U> for T where
U: From<T>,
Convert the Rust type which implements NativeObject
to a &dyn Any
.
Convert the Rust type which implements NativeObject
to a &mut dyn Any
.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String
. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,