pub struct CdrEncoder { /* private fields */ }Expand description
XCDR-Encoder. Buffert Bytes bis finish() aufgerufen wird.
Implementations§
Source§impl CdrEncoder
impl CdrEncoder
pub fn new(endianness: u8) -> Result<CdrEncoder, JsError>
pub fn write_u8(&mut self, value: u8) -> Result<(), JsError>
pub fn write_u16(&mut self, value: u16) -> Result<(), JsError>
pub fn write_u32(&mut self, value: u32) -> Result<(), JsError>
pub fn write_u64(&mut self, value: u64) -> Result<(), JsError>
pub fn write_string(&mut self, value: &str) -> Result<(), JsError>
pub fn write_bytes(&mut self, data: &[u8]) -> Result<(), JsError>
pub fn align(&mut self, alignment: usize)
pub fn position(&self) -> usize
Trait Implementations§
Source§impl From<CdrEncoder> for JsValue
impl From<CdrEncoder> for JsValue
Source§fn from(value: CdrEncoder) -> Self
fn from(value: CdrEncoder) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for CdrEncoder
impl FromWasmAbi for CdrEncoder
Source§impl IntoWasmAbi for CdrEncoder
impl IntoWasmAbi for CdrEncoder
Source§impl LongRefFromWasmAbi for CdrEncoder
impl LongRefFromWasmAbi for CdrEncoder
Source§type Abi = WasmPtr<WasmRefCell<CdrEncoder>>
type Abi = WasmPtr<WasmRefCell<CdrEncoder>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<CdrEncoder>
type Anchor = RcRef<CdrEncoder>
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 CdrEncoder
impl OptionFromWasmAbi for CdrEncoder
Source§impl OptionIntoWasmAbi for CdrEncoder
impl OptionIntoWasmAbi for CdrEncoder
Source§impl RefFromWasmAbi for CdrEncoder
impl RefFromWasmAbi for CdrEncoder
Source§type Abi = WasmPtr<WasmRefCell<CdrEncoder>>
type Abi = WasmPtr<WasmRefCell<CdrEncoder>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<CdrEncoder>
type Anchor = RcRef<CdrEncoder>
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 CdrEncoder
impl RefMutFromWasmAbi for CdrEncoder
Source§type Abi = WasmPtr<WasmRefCell<CdrEncoder>>
type Abi = WasmPtr<WasmRefCell<CdrEncoder>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<CdrEncoder>
type Anchor = RcRefMut<CdrEncoder>
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 CdrEncoder
impl TryFromJsValue for CdrEncoder
Source§impl VectorFromWasmAbi for CdrEncoder
impl VectorFromWasmAbi for CdrEncoder
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[CdrEncoder]>
Source§impl VectorIntoWasmAbi for CdrEncoder
impl VectorIntoWasmAbi for CdrEncoder
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[CdrEncoder]>) -> Self::Abi
Source§impl WasmDescribeVector for CdrEncoder
impl WasmDescribeVector for CdrEncoder
impl SupportsConstructor for CdrEncoder
impl SupportsInstanceProperty for CdrEncoder
impl SupportsStaticProperty for CdrEncoder
Auto Trait Implementations§
impl Freeze for CdrEncoder
impl RefUnwindSafe for CdrEncoder
impl Send for CdrEncoder
impl Sync for CdrEncoder
impl Unpin for CdrEncoder
impl UnsafeUnpin for CdrEncoder
impl UnwindSafe for CdrEncoder
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.