pub struct ManagedBufferReadToEnd<M: ManagedTypeApi> { /* private fields */ }
Expand description
A wrapper over a ManagedBuffer with different decode properties. It reads until the end of the buffer.
Implementations§
Source§impl<M: ManagedTypeApi> ManagedBufferReadToEnd<M>
impl<M: ManagedTypeApi> ManagedBufferReadToEnd<M>
pub fn new_from_buf(buf: ManagedBuffer<M>) -> Self
pub fn as_managed_buffer(&self) -> &ManagedBuffer<M>
pub fn into_managed_buffer(self) -> ManagedBuffer<M>
Trait Implementations§
Source§impl<M: Clone + ManagedTypeApi> Clone for ManagedBufferReadToEnd<M>
impl<M: Clone + ManagedTypeApi> Clone for ManagedBufferReadToEnd<M>
Source§fn clone(&self) -> ManagedBufferReadToEnd<M>
fn clone(&self) -> ManagedBufferReadToEnd<M>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<M: Debug + ManagedTypeApi> Debug for ManagedBufferReadToEnd<M>
impl<M: Debug + ManagedTypeApi> Debug for ManagedBufferReadToEnd<M>
Source§impl<M> From<ManagedBuffer<M>> for ManagedBufferReadToEnd<M>where
M: ManagedTypeApi,
impl<M> From<ManagedBuffer<M>> for ManagedBufferReadToEnd<M>where
M: ManagedTypeApi,
Source§fn from(buf: ManagedBuffer<M>) -> Self
fn from(buf: ManagedBuffer<M>) -> Self
Converts to this type from the input type.
Source§impl<M: ManagedTypeApi> NestedDecode for ManagedBufferReadToEnd<M>
impl<M: ManagedTypeApi> NestedDecode for ManagedBufferReadToEnd<M>
Source§fn dep_decode_or_handle_err<I, H>(
input: &mut I,
h: H,
) -> Result<Self, H::HandledErr>where
I: NestedDecodeInput,
H: DecodeErrorHandler,
fn dep_decode_or_handle_err<I, H>(
input: &mut I,
h: H,
) -> Result<Self, H::HandledErr>where
I: NestedDecodeInput,
H: DecodeErrorHandler,
Version of
dep_decode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn dep_decode<I>(input: &mut I) -> Result<Self, DecodeError>where
I: NestedDecodeInput,
fn dep_decode<I>(input: &mut I) -> Result<Self, DecodeError>where
I: NestedDecodeInput,
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§impl<M: ManagedTypeApi> NestedEncode for ManagedBufferReadToEnd<M>
impl<M: ManagedTypeApi> NestedEncode for ManagedBufferReadToEnd<M>
Source§fn dep_encode_or_handle_err<O, H>(
&self,
dest: &mut O,
h: H,
) -> Result<(), H::HandledErr>where
O: NestedEncodeOutput,
H: EncodeErrorHandler,
fn dep_encode_or_handle_err<O, H>(
&self,
dest: &mut O,
h: H,
) -> Result<(), H::HandledErr>where
O: NestedEncodeOutput,
H: EncodeErrorHandler,
Version of
dep_encode
that can handle errors as soon as they occur.
For instance in can exit immediately and make sure that if it returns, it is a success.
By not deferring error handling, this can lead to somewhat smaller bytecode.Source§fn dep_encode<O>(&self, dest: &mut O) -> Result<(), EncodeError>where
O: NestedEncodeOutput,
fn dep_encode<O>(&self, dest: &mut O) -> Result<(), EncodeError>where
O: NestedEncodeOutput,
NestedEncode to output, using the format of an object nested inside another structure.
Does not provide compact version.
Source§impl<M: ManagedTypeApi> PartialEq for ManagedBufferReadToEnd<M>
impl<M: ManagedTypeApi> PartialEq for ManagedBufferReadToEnd<M>
Source§impl<M: ManagedTypeApi> TryStaticCast for ManagedBufferReadToEnd<M>
impl<M: ManagedTypeApi> TryStaticCast for ManagedBufferReadToEnd<M>
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,
Source§impl<M: ManagedTypeApi> TypeAbi for ManagedBufferReadToEnd<M>
impl<M: ManagedTypeApi> TypeAbi for ManagedBufferReadToEnd<M>
type Unmanaged = Vec<u8>
fn type_name() -> TypeName
fn type_name_rust() -> TypeName
fn type_names() -> TypeNames
Source§fn provide_type_descriptions<TDC: TypeDescriptionContainer>(
accumulator: &mut TDC,
)
fn provide_type_descriptions<TDC: TypeDescriptionContainer>( accumulator: &mut TDC, )
A type can provide more than its own name.
For instance, a struct can also provide the descriptions of the type of its fields.
TypeAbi doesn’t care for the exact accumulator type,
which is abstracted by the TypeDescriptionContainer trait.
impl<M> TypeAbiFrom<&ManagedBufferReadToEnd<M>> for ManagedBufferReadToEnd<M>where
M: ManagedTypeApi,
impl<M> TypeAbiFrom<ManagedBufferReadToEnd<M>> for ManagedBufferReadToEnd<M>where
M: ManagedTypeApi,
Auto Trait Implementations§
impl<M> Freeze for ManagedBufferReadToEnd<M>
impl<M> RefUnwindSafe for ManagedBufferReadToEnd<M>
impl<M> Send for ManagedBufferReadToEnd<M>
impl<M> Sync for ManagedBufferReadToEnd<M>
impl<M> Unpin for ManagedBufferReadToEnd<M>
impl<M> UnwindSafe for ManagedBufferReadToEnd<M>
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