pub struct CdrDecoder { /* private fields */ }Expand description
XCDR-Decoder. Liest Bytes-Slice via Position-Pointer.
Implementations§
Source§impl CdrDecoder
impl CdrDecoder
pub fn new(bytes: Vec<u8>, endianness: u8) -> Result<CdrDecoder, JsError>
pub fn read_u8(&mut self) -> Result<u8, JsError>
pub fn read_u16(&mut self) -> Result<u16, JsError>
pub fn read_u32(&mut self) -> Result<u32, JsError>
pub fn read_u64(&mut self) -> Result<u64, JsError>
pub fn read_string(&mut self) -> Result<String, JsError>
pub fn position(&self) -> usize
pub fn remaining(&self) -> usize
Trait Implementations§
Source§impl From<CdrDecoder> for JsValue
impl From<CdrDecoder> for JsValue
Source§fn from(value: CdrDecoder) -> Self
fn from(value: CdrDecoder) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for CdrDecoder
impl FromWasmAbi for CdrDecoder
Source§impl IntoWasmAbi for CdrDecoder
impl IntoWasmAbi for CdrDecoder
Source§impl LongRefFromWasmAbi for CdrDecoder
impl LongRefFromWasmAbi for CdrDecoder
Source§type Abi = WasmPtr<WasmRefCell<CdrDecoder>>
type Abi = WasmPtr<WasmRefCell<CdrDecoder>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<CdrDecoder>
type Anchor = RcRef<CdrDecoder>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl OptionFromWasmAbi for CdrDecoder
impl OptionFromWasmAbi for CdrDecoder
Source§impl OptionIntoWasmAbi for CdrDecoder
impl OptionIntoWasmAbi for CdrDecoder
Source§impl RefFromWasmAbi for CdrDecoder
impl RefFromWasmAbi for CdrDecoder
Source§type Abi = WasmPtr<WasmRefCell<CdrDecoder>>
type Abi = WasmPtr<WasmRefCell<CdrDecoder>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<CdrDecoder>
type Anchor = RcRef<CdrDecoder>
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§impl RefMutFromWasmAbi for CdrDecoder
impl RefMutFromWasmAbi for CdrDecoder
Source§type Abi = WasmPtr<WasmRefCell<CdrDecoder>>
type Abi = WasmPtr<WasmRefCell<CdrDecoder>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<CdrDecoder>
type Anchor = RcRefMut<CdrDecoder>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl TryFromJsValue for CdrDecoder
impl TryFromJsValue for CdrDecoder
Source§impl VectorFromWasmAbi for CdrDecoder
impl VectorFromWasmAbi for CdrDecoder
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[CdrDecoder]>
Source§impl VectorIntoWasmAbi for CdrDecoder
impl VectorIntoWasmAbi for CdrDecoder
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[CdrDecoder]>) -> Self::Abi
Source§impl WasmDescribeVector for CdrDecoder
impl WasmDescribeVector for CdrDecoder
impl SupportsConstructor for CdrDecoder
impl SupportsInstanceProperty for CdrDecoder
impl SupportsStaticProperty for CdrDecoder
Auto Trait Implementations§
impl Freeze for CdrDecoder
impl RefUnwindSafe for CdrDecoder
impl Send for CdrDecoder
impl Sync for CdrDecoder
impl Unpin for CdrDecoder
impl UnsafeUnpin for CdrDecoder
impl UnwindSafe for CdrDecoder
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> 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::AbiSource§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.