Struct dharitri_wasm::types::ManagedRef
source · pub struct ManagedRef<M, T>where
M: ManagedTypeApi,
T: ManagedType<M>,{ /* private fields */ }Implementations§
source§impl<M, T> ManagedRef<M, T>where
M: ManagedTypeApi,
T: ManagedType<M>,
impl<M, T> ManagedRef<M, T>where
M: ManagedTypeApi,
T: ManagedType<M>,
Trait Implementations§
source§impl<M, T> Clone for ManagedRef<M, T>where
M: ManagedTypeApi,
T: ManagedType<M>,
impl<M, T> Clone for ManagedRef<M, T>where
M: ManagedTypeApi,
T: ManagedType<M>,
source§impl<M, T> Deref for ManagedRef<M, T>where
M: ManagedTypeApi,
T: ManagedType<M>,
impl<M, T> Deref for ManagedRef<M, T>where
M: ManagedTypeApi,
T: ManagedType<M>,
source§impl<'a, M, T> From<&T> for ManagedRef<M, T>where
M: ManagedTypeApi,
T: ManagedType<M>,
impl<'a, M, T> From<&T> for ManagedRef<M, T>where
M: ManagedTypeApi,
T: ManagedType<M>,
source§impl<M, T> From<T> for ManagedRef<M, T>where
M: ManagedTypeApi,
T: ManagedType<M>,
impl<M, T> From<T> for ManagedRef<M, T>where
M: ManagedTypeApi,
T: ManagedType<M>,
source§impl<M, T> ManagedType<M> for ManagedRef<M, T>where
M: ManagedTypeApi,
T: ManagedType<M>,
impl<M, T> ManagedType<M> for ManagedRef<M, T>where
M: ManagedTypeApi,
T: ManagedType<M>,
fn type_manager(&self) -> M
source§impl<M, T> NestedDecode for ManagedRef<M, T>
impl<M, T> NestedDecode for ManagedRef<M, T>
source§fn dep_decode<I: NestedDecodeInput>(input: &mut I) -> Result<Self, DecodeError>
fn dep_decode<I: NestedDecodeInput>(input: &mut I) -> Result<Self, DecodeError>
Attempt to deserialise the value from input,
using the format of an object nested inside another structure.
In case of success returns the deserialized value and the number of bytes consumed during the operation.
source§fn dep_decode_or_exit<I: NestedDecodeInput, ExitCtx: Clone>(
input: &mut I,
c: ExitCtx,
exit: fn(_: ExitCtx, _: DecodeError) -> !
) -> Self
fn dep_decode_or_exit<I: NestedDecodeInput, ExitCtx: Clone>( input: &mut I, c: ExitCtx, exit: fn(_: ExitCtx, _: DecodeError) -> ! ) -> Self
Version of
top_decode that exits quickly in case of error.
Its purpose is to create smaller implementations
in cases where the application is supposed to exit directly on decode error.source§impl<M, T> NestedEncode for ManagedRef<M, T>
impl<M, T> NestedEncode for ManagedRef<M, T>
source§fn dep_encode<O: NestedEncodeOutput>(
&self,
dest: &mut O
) -> Result<(), EncodeError>
fn dep_encode<O: NestedEncodeOutput>( &self, dest: &mut O ) -> Result<(), EncodeError>
NestedEncode to output, using the format of an object nested inside another structure.
Does not provide compact version.
source§fn dep_encode_or_exit<O, ExitCtx>(
&self,
dest: &mut O,
c: ExitCtx,
exit: fn(_: ExitCtx, _: EncodeError) -> !
)where
O: NestedEncodeOutput,
ExitCtx: Clone,
fn dep_encode_or_exit<O, ExitCtx>(
&self,
dest: &mut O,
c: ExitCtx,
exit: fn(_: ExitCtx, _: EncodeError) -> !
)where
O: NestedEncodeOutput,
ExitCtx: Clone,
Version of
top_decode that exits quickly in case of error.
Its purpose is to create smaller implementations
in cases where the application is supposed to exit directly on decode error.source§impl<M, T> TopDecode for ManagedRef<M, T>
impl<M, T> TopDecode for ManagedRef<M, T>
source§fn top_decode<I: TopDecodeInput>(input: I) -> Result<Self, DecodeError>
fn top_decode<I: TopDecodeInput>(input: I) -> Result<Self, DecodeError>
Attempt to deserialize the value from input.
source§fn top_decode_or_exit<I, ExitCtx>(
input: I,
c: ExitCtx,
exit: fn(_: ExitCtx, _: DecodeError) -> !
) -> Selfwhere
I: TopDecodeInput,
ExitCtx: Clone,
fn top_decode_or_exit<I, ExitCtx>(
input: I,
c: ExitCtx,
exit: fn(_: ExitCtx, _: DecodeError) -> !
) -> Selfwhere
I: TopDecodeInput,
ExitCtx: Clone,
Version of
top_decode that exits quickly in case of error.
Its purpose is to create smaller implementations
in cases where the application is supposed to exit directly on decode error.source§impl<M, T> TopDecodeInput for ManagedRef<M, T>
impl<M, T> TopDecodeInput for ManagedRef<M, T>
type NestedBuffer = <T as TopDecodeInput>::NestedBuffer
source§fn into_boxed_slice_u8(self) -> Box<[u8]>
fn into_boxed_slice_u8(self) -> Box<[u8]>
Provides the underlying data as an owned byte slice box.
Consumes the input object in the process.
fn into_specialized<TSC, F>(self, else_deser: F) -> Result<TSC, DecodeError>
fn into_nested_buffer(self) -> Self::NestedBuffer
source§fn into_u64(self) -> u64
fn into_u64(self) -> u64
Retrieves the underlying data as a pre-parsed u64.
Expected to panic if the conversion is not possible. Read more
source§fn into_i64(self) -> i64
fn into_i64(self) -> i64
Retrieves the underlying data as a pre-parsed i64.
Expected to panic if the conversion is not possible. Read more
source§fn into_specialized_or_exit<T, F, ExitCtx>(
self,
c: ExitCtx,
exit: fn(_: ExitCtx, _: DecodeError) -> !,
else_deser: F
) -> Twhere
T: TryStaticCast,
ExitCtx: Clone,
F: FnOnce(Self, ExitCtx, fn(_: ExitCtx, _: DecodeError) -> !) -> T,
fn into_specialized_or_exit<T, F, ExitCtx>(
self,
c: ExitCtx,
exit: fn(_: ExitCtx, _: DecodeError) -> !,
else_deser: F
) -> Twhere
T: TryStaticCast,
ExitCtx: Clone,
F: FnOnce(Self, ExitCtx, fn(_: ExitCtx, _: DecodeError) -> !) -> T,
Note: currently not in use.
source§impl<M, T> TopEncode for ManagedRef<M, T>
impl<M, T> TopEncode for ManagedRef<M, T>
source§fn top_encode<O: TopEncodeOutput>(&self, output: O) -> Result<(), EncodeError>
fn top_encode<O: TopEncodeOutput>(&self, output: O) -> Result<(), EncodeError>
Attempt to serialize the value to ouput.
source§fn top_encode_or_exit<O, ExitCtx>(
&self,
output: O,
c: ExitCtx,
exit: fn(_: ExitCtx, _: EncodeError) -> !
)where
O: TopEncodeOutput,
ExitCtx: Clone,
fn top_encode_or_exit<O, ExitCtx>(
&self,
output: O,
c: ExitCtx,
exit: fn(_: ExitCtx, _: EncodeError) -> !
)where
O: TopEncodeOutput,
ExitCtx: Clone,
Version of
top_decode that exits quickly in case of error.
Its purpose is to create smaller bytecode implementations
in cases where the application is supposed to exit directly on decode error.source§impl<M: ManagedTypeApi, T: ManagedType<M> + 'static> TryStaticCast for ManagedRef<M, T>
impl<M: ManagedTypeApi, T: ManagedType<M> + 'static> TryStaticCast for ManagedRef<M, T>
fn type_eq<U>() -> boolwhere
U: TryStaticCast,
fn try_cast<U>(self) -> Option<U>where
U: TryStaticCast,
fn try_cast_ref<U>(&self) -> Option<&U>where
U: TryStaticCast,
Auto Trait Implementations§
impl<M, T> RefUnwindSafe for ManagedRef<M, T>where
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<M, T> Send for ManagedRef<M, T>
impl<M, T> Sync for ManagedRef<M, T>
impl<M, T> Unpin for ManagedRef<M, T>
impl<M, T> UnwindSafe for ManagedRef<M, T>where
M: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
source§impl<M, T> AsManagedRef<M, T> for Twhere
M: ManagedTypeApi,
T: ManagedType<M>,
impl<M, T> AsManagedRef<M, T> for Twhere
M: ManagedTypeApi,
T: ManagedType<M>,
fn as_managed_ref(&self) -> ManagedRef<M, T>
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