Movatterモバイル変換


[0]ホーム

URL:


Docs.rs

JsString

StructJsString 

Source
pub struct JsString {/* private fields */ }
Expand description

A Latin1 or UTF-16–encoded, reference counted, immutable string.

This is pretty similar to aRc<[u16]>, but without thelength metadata associated with theRc fat pointer. Instead, the length of every string isstored on the heap, along with its reference counter and its data.

The string can be latin1 (stored as a byte for space efficiency) or U16 encoding.

We define some commonly used string constants in an interner. For these strings, we don’t allocatememory on the heap to reduce the overhead of memory allocation and reference counting.

Implementations§

Source§

implJsString

Source

pub fniter(&self) ->Iter<'_>

Create an iterator over theJsString.

Source

pub fnwindows(&self, size:usize) -> Windows<'_>

Create an iterator over overlapping subslices of length size.

Source

pub fnto_std_string_escaped(&self) ->String

Decodes aJsString into aString, replacing invalid data with its escaped representationin 4 digit hexadecimal.

Source

pub fnto_std_string_lossy(&self) ->String

Decodes aJsString into aString, replacing invalid data with thereplacement character U+FFFD.

Source

pub fnto_std_string(&self) ->Result<String,FromUtf16Error>

Decodes aJsString into aString, returning an error if the string contains unpairedsurrogates.

§Errors

FromUtf16Error if it contains any invalid data.

Source

pub fnto_std_string_with_surrogates( &self,) -> implIterator<Item =Result<String,u16>>

Decodes aJsString into an iterator ofResult<String, u16>, returning surrogates aserrors.

Source

pub fnmap_valid_segments<F>(&self, f: F) ->JsString
where F:FnMut(String) ->String,

Maps the valid segments of an UTF16 string and leaves the unpaired surrogates unchanged.

Source

pub fncode_points(&self) -> implIterator<Item =CodePoint> +Clone

Gets an iterator of all the Unicode codepoints of aJsString.

Source

pub fnindex_of( &self, search_value:JsStr<'_>, from_index:usize,) ->Option<usize>

Abstract operationStringIndexOf ( string, searchValue, fromIndex )

Note: Instead of returning an isize with-1 as the “not found” value, we make use of thetype system and returnOption<usize> withNone as the “not found” value.

More information:

Source

pub fncode_point_at(&self, position:usize) ->CodePoint

Abstract operationCodePointAt( string, position ).

The abstract operationCodePointAt takes argumentsstring (a String) andposition (anon-negative integer) and returns a Record with fields[[CodePoint]] (a code point),[[CodeUnitCount]] (a positive integer), and[[IsUnpairedSurrogate]] (a Boolean). Itinterprets string as a sequence of UTF-16 encoded code points, as described in 6.1.4, and readsfrom it a single code point starting with the code unit at indexposition.

More information:

§Panics

Ifposition is smaller than size of string.

Source

pub fnto_number(&self) ->f64

Abstract operationStringToNumber ( str )

More information:

Source

pub fnlen(&self) ->usize

Get the length of theJsString.

Source

pub fnis_empty(&self) ->bool

Return true if theJsString is emtpy.

Source

pub fnto_vec(&self) ->Vec<u16>

Convert theJsString into aVec<U16>.

Source

pub fncontains(&self, element:u8) ->bool

Check if theJsString contains a byte.

Source

pub fntrim(&self) ->JsStr<'_>

Trim whitespace from the start and end of theJsString.

Source

pub fntrim_start(&self) ->JsStr<'_>

Trim whitespace from the start of theJsString.

Source

pub fntrim_end(&self) ->JsStr<'_>

Trim whitespace from the end of theJsString.

Source

pub fnget<'a, I>(&'a self, index: I) ->Option<<I as JsSliceIndex<'a>>::Value>
where I: JsSliceIndex<'a>,

Get the element a the given index,None otherwise.

Source

pub unsafe fnget_unchecked<'a, I>( &'a self, index: I,) -> <I as JsSliceIndex<'a>>::Value
where I: JsSliceIndex<'a>,

Returns an element or subslice depending on the type of index, without doing bounds check.

§Safety

Caller must ensure the index is not out of bounds

Source

pub fnget_expect<'a, I>(&'a self, index: I) -> <I as JsSliceIndex<'a>>::Value
where I: JsSliceIndex<'a>,

Get the element a the given index.

§Panics

If the index is out of bounds.

Source

pub fndisplay_escaped(&self) -> JsStrDisplayEscaped<'_>

Gets a displayable escaped string. This may be faster and has fewerallocations thanformat!("{}", str.to_string_escaped()) whendisplaying.

Source

pub fndisplay_lossy(&self) -> JsStrDisplayLossy<'_>

Gets a displayable lossy string. This may be faster and has fewerallocations thanformat!("{}", str.to_string_lossy()) when displaying.

Source

pub fninto_raw(self) ->NonNull<RawJsString>

Consumes theJsString, returning a pointer toRawJsString.

To avoid a memory leak the pointer must be converted back to aJsString usingJsString::from_raw.

Source

pub unsafe fnfrom_raw(ptr:NonNull<RawJsString>) ->JsString

Constructs aJsString from a pointer toRawJsString.

The raw pointer must have been previously returned by a call toJsString::into_raw.

§Safety

This function is unsafe because improper use may lead to memory unsafety,even if the returnedJsString is never accessed.

Source§

implJsString

Source

pub const fnfrom_static_js_str(src: &'staticJsStr<'static>) ->JsString

Create aJsString from a static js string.

Source

pub fnis_static(&self) ->bool

Check if theJsString is static.

Source

pub fnas_str(&self) ->JsStr<'_>

Obtains the underlying&[u16] slice of aJsString

Source

pub fnconcat(x:JsStr<'_>, y:JsStr<'_>) ->JsString

Creates a newJsString from the concatenation ofx andy.

Source

pub fnconcat_array(strings: &[JsStr<'_>]) ->JsString

Creates a newJsString from the concatenation of every element ofstrings.

Source

pub fnrefcount(&self) ->Option<usize>

Gets the number ofJsStrings which point to this allocation.

Trait Implementations§

Source§

implClone forJsString

Source§

fnclone(&self) ->JsString

Returns a duplicate of the value.Read more
1.0.0 ·Source§

fnclone_from(&mut self, source: &Self)

Performs copy-assignment fromsource.Read more
Source§

implDebug forJsString

Source§

fnfmt(&self, f: &mutFormatter<'_>) ->Result<(),Error>

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

implDefault forJsString

Source§

fndefault() ->JsString

Returns the “default value” for a type.Read more
Source§

implDrop forJsString

Source§

fndrop(&mut self)

Executes the destructor for this type.Read more
Source§

implFinalize forJsString

Source§

fnfinalize(&self)

Cleanup logic for a type.
Source§

implFrom<&[JsString]> forJsString

Source§

fnfrom(value: &[JsString]) ->JsString

Converts to this type from the input type.
Source§

impl<const N:usize>From<&[JsString;N]> forJsString

Source§

fnfrom(value: &[JsString;N]) ->JsString

Converts to this type from the input type.
Source§

implFrom<&[u16]> forJsString

Source§

fnfrom(s: &[u16]) ->JsString

Converts to this type from the input type.
Source§

impl<const N:usize>From<&[u16;N]> forJsString

Source§

fnfrom(s: &[u16;N]) ->JsString

Converts to this type from the input type.
Source§

impl<'a>From<&'aJsString> forJsStr<'a>

Source§

fnfrom(value: &'aJsString) ->JsStr<'a>

Converts to this type from the input type.
Source§

implFrom<&str> forJsString

Source§

fnfrom(s: &str) ->JsString

Converts to this type from the input type.
Source§

impl<'a>From<Cow<'a,str>> forJsString

Source§

fnfrom(s:Cow<'a,str>) ->JsString

Converts to this type from the input type.
Source§

implFrom<JsStr<'_>> forJsString

Source§

fnfrom(value:JsStr<'_>) ->JsString

Converts to this type from the input type.
Source§

implFrom<JsString> forFunctionBinding

Source§

fnfrom(name:JsString) -> Self

Converts to this type from the input type.
Source§

implFrom<JsString> forJsValue

Source§

fnfrom(value:JsString) -> Self

Converts to this type from the input type.
Source§

implFrom<JsString> forPropertyKey

Source§

fnfrom(string:JsString) -> Self

Converts to this type from the input type.
Source§

implFrom<String> forJsString

Source§

fnfrom(s:String) ->JsString

Converts to this type from the input type.
Source§

implFrom<f32> forJsString

Source§

fnfrom(value:f32) ->JsString

Converts to this type from the input type.
Source§

implFrom<f64> forJsString

Source§

fnfrom(value:f64) ->JsString

Converts to this type from the input type.
Source§

implFrom<i128> forJsString

Source§

fnfrom(value:i128) ->JsString

Converts to this type from the input type.
Source§

implFrom<i16> forJsString

Source§

fnfrom(value:i16) ->JsString

Converts to this type from the input type.
Source§

implFrom<i32> forJsString

Source§

fnfrom(value:i32) ->JsString

Converts to this type from the input type.
Source§

implFrom<i64> forJsString

Source§

fnfrom(value:i64) ->JsString

Converts to this type from the input type.
Source§

implFrom<i8> forJsString

Source§

fnfrom(value:i8) ->JsString

Converts to this type from the input type.
Source§

implFrom<isize> forJsString

Source§

fnfrom(value:isize) ->JsString

Converts to this type from the input type.
Source§

implFrom<u128> forJsString

Source§

fnfrom(value:u128) ->JsString

Converts to this type from the input type.
Source§

implFrom<u16> forJsString

Source§

fnfrom(value:u16) ->JsString

Converts to this type from the input type.
Source§

implFrom<u32> forJsString

Source§

fnfrom(value:u32) ->JsString

Converts to this type from the input type.
Source§

implFrom<u64> forJsString

Source§

fnfrom(value:u64) ->JsString

Converts to this type from the input type.
Source§

implFrom<u8> forJsString

Source§

fnfrom(value:u8) ->JsString

Converts to this type from the input type.
Source§

implFrom<usize> forJsString

Source§

fnfrom(value:usize) ->JsString

Converts to this type from the input type.
Source§

implFromStr forJsString

Source§

typeErr =Infallible

The associated error which can be returned from parsing.
Source§

fnfrom_str(s: &str) ->Result<JsString, <JsString asFromStr>::Err>

Parses a strings to return a value of this type.Read more
Source§

implHash forJsString

Source§

fnhash<H>(&self, state:&mut H)
where H:Hasher,

Feeds this value into the givenHasher.Read more
1.3.0 ·Source§

fnhash_slice<H>(data: &[Self], state:&mut H)
where H:Hasher, Self:Sized,

Feeds a slice of this type into the givenHasher.Read more
Source§

impl<'a>IntoIterator for &'aJsString

Source§

typeIntoIter =Iter<'a>

Which kind of iterator are we turning this into?
Source§

typeItem =u16

The type of the elements being iterated over.
Source§

fninto_iter(self) -> <&'aJsString asIntoIterator>::IntoIter

Creates an iterator from a value.Read more
Source§

implOrd forJsString

Source§

fncmp(&self, other: &JsString) ->Ordering

This method returns anOrdering betweenself andother.Read more
1.21.0 ·Source§

fnmax(self, other: Self) -> Self
where Self:Sized,

Compares and returns the maximum of two values.Read more
1.21.0 ·Source§

fnmin(self, other: Self) -> Self
where Self:Sized,

Compares and returns the minimum of two values.Read more
1.50.0 ·Source§

fnclamp(self, min: Self, max: Self) -> Self
where Self:Sized,

Restrict a value to a certain interval.Read more
Source§

implPartialEq<&str> forJsString

Source§

fneq(&self, other: &&str) ->bool

Tests forself andother values to be equal, and is used by==.
1.0.0 ·Source§

fnne(&self, other:&Rhs) ->bool

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

implPartialEq<[u16]> forJsString

Source§

fneq(&self, other: &[u16]) ->bool

Tests forself andother values to be equal, and is used by==.
1.0.0 ·Source§

fnne(&self, other:&Rhs) ->bool

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

impl<const N:usize>PartialEq<[u16;N]> forJsString

Source§

fneq(&self, other: &[u16;N]) ->bool

Tests forself andother values to be equal, and is used by==.
1.0.0 ·Source§

fnne(&self, other:&Rhs) ->bool

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

implPartialEq<JsStr<'_>> forJsString

Source§

fneq(&self, other: &JsStr<'_>) ->bool

Tests forself andother values to be equal, and is used by==.
1.0.0 ·Source§

fnne(&self, other:&Rhs) ->bool

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

implPartialEq<JsString> for [u16]

Source§

fneq(&self, other: &JsString) ->bool

Tests forself andother values to be equal, and is used by==.
1.0.0 ·Source§

fnne(&self, other:&Rhs) ->bool

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

impl<const N:usize>PartialEq<JsString> for [u16;N]

Source§

fneq(&self, other: &JsString) ->bool

Tests forself andother values to be equal, and is used by==.
1.0.0 ·Source§

fnne(&self, other:&Rhs) ->bool

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

implPartialEq<JsString> forJsStr<'_>

Source§

fneq(&self, other: &JsString) ->bool

Tests forself andother values to be equal, and is used by==.
1.0.0 ·Source§

fnne(&self, other:&Rhs) ->bool

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

implPartialEq<JsString> forstr

Source§

fneq(&self, other: &JsString) ->bool

Tests forself andother values to be equal, and is used by==.
1.0.0 ·Source§

fnne(&self, other:&Rhs) ->bool

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

implPartialEq<str> forJsString

Source§

fneq(&self, other: &str) ->bool

Tests forself andother values to be equal, and is used by==.
1.0.0 ·Source§

fnne(&self, other:&Rhs) ->bool

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

implPartialEq forJsString

Source§

fneq(&self, other: &JsString) ->bool

Tests forself andother values to be equal, and is used by==.
1.0.0 ·Source§

fnne(&self, other:&Rhs) ->bool

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

implPartialOrd forJsString

Source§

fnpartial_cmp(&self, other: &JsString) ->Option<Ordering>

This method returns an ordering betweenself andother values if one exists.Read more
1.0.0 ·Source§

fnlt(&self, other:&Rhs) ->bool

Tests less than (forself andother) and is used by the< operator.Read more
1.0.0 ·Source§

fnle(&self, other:&Rhs) ->bool

Tests less than or equal to (forself andother) and is used by the<= operator.Read more
1.0.0 ·Source§

fngt(&self, other:&Rhs) ->bool

Tests greater than (forself andother) and is used by the>operator.Read more
1.0.0 ·Source§

fnge(&self, other:&Rhs) ->bool

Tests greater than or equal to (forself andother) and is used bythe>= operator.Read more
Source§

implTrace forJsString

Source§

unsafe fntrace(&self, _tracer: &mut Tracer)

Marks all containedGcs.Read more
Source§

unsafe fntrace_non_roots(&self)

Trace handles located in GC heap, and mark them as non root.Read more
Source§

fnrun_finalizer(&self)

RunsFinalize::finalize on this object and allcontained subobjects.
Source§

implTryFromJs forJsString

Source§

fntry_from_js(value: &JsValue, _context: &mutContext) ->JsResult<Self>

This function tries to convert a JavaScript value intoSelf.
Source§

implTryIntoJs forJsString

Source§

fntry_into_js(&self, _context: &mutContext) ->JsResult<JsValue>

This function tries to convert aSelf intoJsValue.
Source§

implEq forJsString

Source§

implJsData forJsString

Auto Trait Implementations§

§

implFreeze forJsString

§

impl !RefUnwindSafe forJsString

§

impl !Send forJsString

§

impl !Sync forJsString

§

implUnpin forJsString

§

impl !UnwindSafe forJsString

Blanket Implementations§

Source§

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

Source§

fntype_id(&self) ->TypeId

Gets theTypeId ofself.Read more
Source§

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

Source§

fnborrow(&self) ->&T

Immutably borrows from an owned value.Read more
Source§

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

Source§

fnborrow_mut(&mut self) ->&mut T

Mutably borrows from an owned value.Read more
Source§

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

Source§

unsafe fnclone_to_uninit(&self, dest:*mutu8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment fromself todest.Read more
Source§

impl<Q, K>Comparable<K> for Q
where Q:Ord + ?Sized, K:Borrow<Q> + ?Sized,

Source§

fncompare(&self, key:&K) ->Ordering

Compare self tokey and return their ordering.
Source§

impl<T>Conv for T

Source§

fnconv<T>(self) -> T
where Self:Into<T>,

Convertsself intoT usingInto<T>.Read more
Source§

impl<Q, K>Equivalent<K> for Q
where Q:Eq + ?Sized, K:Borrow<Q> + ?Sized,

Source§

fnequivalent(&self, key:&K) ->bool

Compare self tokey and returntrue if they are equal.
Source§

impl<Q, K>Equivalent<K> for Q
where Q:Eq + ?Sized, K:Borrow<Q> + ?Sized,

Source§

fnequivalent(&self, key:&K) ->bool

Checks if this value is equivalent to the given key.Read more
Source§

impl<T>From<T> for T

Source§

fnfrom(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fninto(self) -> U

CallsU::from(self).

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

Source§

impl<T>IntoEither for T

Source§

fninto_either(self, into_left:bool) ->Either<Self, Self>

Convertsself into aLeft variant ofEither<Self, Self>ifinto_left istrue.Convertsself into aRight variant ofEither<Self, Self>otherwise.Read more
Source§

fninto_either_with<F>(self, into_left: F) ->Either<Self, Self>
where F:FnOnce(&Self) ->bool,

Convertsself into aLeft variant ofEither<Self, Self>ifinto_left(&self) returnstrue.Convertsself into aRight variant ofEither<Self, Self>otherwise.Read more
Source§

impl<T>NativeObject for T
where T:Any +Trace +JsData,

Source§

fnas_any(&self) -> &(dynAny + 'static)

Convert the Rust type which implementsNativeObject to a&dyn Any.
Source§

fnas_mut_any(&mut self) -> &mut (dynAny + 'static)

Convert the Rust type which implementsNativeObject to a&mut dyn Any.
Source§

fntype_name_of_value(&self) -> &'staticstr

Gets the type name of the value.
Source§

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

Source§

fnpipe<R>(self, func: implFnOnce(Self) -> R) -> R
where Self:Sized,

Pipes by value. This is generally the method you want to use.Read more
Source§

fnpipe_ref<'a, R>(&'a self, func: implFnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrowsself and passes that borrow into the pipe function.Read more
Source§

fnpipe_ref_mut<'a, R>(&'a mut self, func: implFnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrowsself and passes that borrow into the pipe function.Read more
Source§

fnpipe_borrow<'a, B, R>(&'a self, func: implFnOnce(&'a B) -> R) -> R
where Self:Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrowsself, then passesself.borrow() into the pipe function.Read more
Source§

fnpipe_borrow_mut<'a, B, R>( &'a mut self, func: implFnOnce(&'a mut B) -> R,) -> R
where Self:BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrowsself, then passesself.borrow_mut() into the pipefunction.Read more
Source§

fnpipe_as_ref<'a, U, R>(&'a self, func: implFnOnce(&'a U) -> R) -> R
where Self:AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrowsself, then passesself.as_ref() into the pipe function.
Source§

fnpipe_as_mut<'a, U, R>(&'a mut self, func: implFnOnce(&'a mut U) -> R) -> R
where Self:AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrowsself, then passesself.as_mut() into the pipefunction.
Source§

fnpipe_deref<'a, T, R>(&'a self, func: implFnOnce(&'a T) -> R) -> R
where Self:Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrowsself, then passesself.deref() into the pipe function.
Source§

fnpipe_deref_mut<'a, T, R>( &'a mut self, func: implFnOnce(&'a mut T) -> R,) -> R
where Self:DerefMut<Target = T> +Deref, T: 'a + ?Sized, R: 'a,

Mutably borrowsself, then passesself.deref_mut() into the pipefunction.
Source§

impl<T>Tap for T

Source§

fntap(self, func: implFnOnce(&Self)) -> Self

Immutable access to a value.Read more
Source§

fntap_mut(self, func: implFnOnce(&mut Self)) -> Self

Mutable access to a value.Read more
Source§

fntap_borrow<B>(self, func: implFnOnce(&B)) -> Self
where Self:Borrow<B>, B: ?Sized,

Immutable access to theBorrow<B> of a value.Read more
Source§

fntap_borrow_mut<B>(self, func: implFnOnce(&mut B)) -> Self
where Self:BorrowMut<B>, B: ?Sized,

Mutable access to theBorrowMut<B> of a value.Read more
Source§

fntap_ref<R>(self, func: implFnOnce(&R)) -> Self
where Self:AsRef<R>, R: ?Sized,

Immutable access to theAsRef<R> view of a value.Read more
Source§

fntap_ref_mut<R>(self, func: implFnOnce(&mut R)) -> Self
where Self:AsMut<R>, R: ?Sized,

Mutable access to theAsMut<R> view of a value.Read more
Source§

fntap_deref<T>(self, func: implFnOnce(&T)) -> Self
where Self:Deref<Target = T>, T: ?Sized,

Immutable access to theDeref::Target of a value.Read more
Source§

fntap_deref_mut<T>(self, func: implFnOnce(&mut T)) -> Self
where Self:DerefMut<Target = T> +Deref, T: ?Sized,

Mutable access to theDeref::Target of a value.Read more
Source§

fntap_dbg(self, func: implFnOnce(&Self)) -> Self

Calls.tap() only in debug builds, and is erased in release builds.
Source§

fntap_mut_dbg(self, func: implFnOnce(&mut Self)) -> Self

Calls.tap_mut() only in debug builds, and is erased in releasebuilds.
Source§

fntap_borrow_dbg<B>(self, func: implFnOnce(&B)) -> Self
where Self:Borrow<B>, B: ?Sized,

Calls.tap_borrow() only in debug builds, and is erased in releasebuilds.
Source§

fntap_borrow_mut_dbg<B>(self, func: implFnOnce(&mut B)) -> Self
where Self:BorrowMut<B>, B: ?Sized,

Calls.tap_borrow_mut() only in debug builds, and is erased in releasebuilds.
Source§

fntap_ref_dbg<R>(self, func: implFnOnce(&R)) -> Self
where Self:AsRef<R>, R: ?Sized,

Calls.tap_ref() only in debug builds, and is erased in releasebuilds.
Source§

fntap_ref_mut_dbg<R>(self, func: implFnOnce(&mut R)) -> Self
where Self:AsMut<R>, R: ?Sized,

Calls.tap_ref_mut() only in debug builds, and is erased in releasebuilds.
Source§

fntap_deref_dbg<T>(self, func: implFnOnce(&T)) -> Self
where Self:Deref<Target = T>, T: ?Sized,

Calls.tap_deref() only in debug builds, and is erased in releasebuilds.
Source§

fntap_deref_mut_dbg<T>(self, func: implFnOnce(&mut T)) -> Self
where Self:DerefMut<Target = T> +Deref, T: ?Sized,

Calls.tap_deref_mut() only in debug builds, and is erased in releasebuilds.
Source§

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

Source§

typeOwned = T

The resulting type after obtaining ownership.
Source§

fnto_owned(&self) -> T

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

fnclone_into(&self, target:&mut T)

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

impl<T>TryConv for T

Source§

fntry_conv<T>(self) ->Result<T, Self::Error>
where Self:TryInto<T>,

Attempts to convertself intoT usingTryInto<T>.Read more
Source§

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

Source§

typeError =Infallible

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

fntry_from(value: U) ->Result<T, <T asTryFrom<U>>::Error>

Performs the conversion.
Source§

impl<'a, T>TryFromJsArgument<'a> for T
where T:TryFromJs,

Source§

fntry_from_js_argument( _: &'aJsValue, rest: &'a [JsValue], context: &mutContext,) ->Result<(T, &'a [JsValue]),JsError>

Try to convert a JS argument into a Rust value, returning thevalue and the rest of the arguments to be parsed.Read more
Source§

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

Source§

typeError = <U asTryFrom<T>>::Error

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

fntry_into(self) ->Result<U, <U asTryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T>TryIntoJsResult for T
where T:TryIntoJs,

Source§

fntry_into_js_result(self, ctx: &mutContext) ->Result<JsValue,JsError>

Try to convert a Rust value into aJsResult<JsValue>.Read more
Source§

impl<V, T>VZip<V> for T
where V:MultiLane<T>,

Source§

fnvzip(self) -> V

Source§

impl<T>ErasedDestructor for T
where T: 'static,


[8]ページ先頭

©2009-2025 Movatter.jp