pub struct Int(/* private fields */);
Implementations§
Source§impl Int
impl Int
pub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<Int, JsValue>
pub fn to_json(&self) -> Result<String, JsValue>
pub fn to_json_value(&self) -> Result<JsValue, JsValue>
pub fn from_json(json: &str) -> Result<Int, JsValue>
pub fn new(x: i64) -> Int
pub fn to_str(&self) -> String
pub fn from_str(string: &str) -> Result<Int, JsValue>
Trait Implementations§
Source§impl FromWasmAbi for Int
impl FromWasmAbi for Int
Source§impl IntoWasmAbi for Int
impl IntoWasmAbi for Int
Source§impl LongRefFromWasmAbi for Int
impl LongRefFromWasmAbi for Int
Source§impl OptionFromWasmAbi for Int
impl OptionFromWasmAbi for Int
Source§impl OptionIntoWasmAbi for Int
impl OptionIntoWasmAbi for Int
Source§impl RefFromWasmAbi for Int
impl RefFromWasmAbi for Int
Source§type Anchor = RcRef<Int>
type Anchor = RcRef<Int>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§unsafe fn ref_from_abi(
js: <Int as RefFromWasmAbi>::Abi,
) -> <Int as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <Int as RefFromWasmAbi>::Abi, ) -> <Int as RefFromWasmAbi>::Anchor
Source§impl RefMutFromWasmAbi for Int
impl RefMutFromWasmAbi for Int
Source§impl TryFromJsValue for Int
impl TryFromJsValue for Int
Source§impl VectorFromWasmAbi for Int
impl VectorFromWasmAbi for Int
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: <Int as VectorFromWasmAbi>::Abi) -> Box<[Int]>
Source§impl VectorIntoWasmAbi for Int
impl VectorIntoWasmAbi for Int
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Int]>) -> <Int as VectorIntoWasmAbi>::Abi
Auto Trait Implementations§
impl Freeze for Int
impl RefUnwindSafe for Int
impl Send for Int
impl Sync for Int
impl Unpin for Int
impl UnwindSafe for Int
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.