Struct holochain_zome_types::warrant::UnsafeBytes
source · [−]pub struct UnsafeBytes(_);
Expand description
UnsafeBytes the only way to implement a custom round trip through bytes for SerializedBytes It is intended to be an internal implementation in TryFrom implementations The assumption is that any code using UnsafeBytes is NOT valid messagepack data This allows us to enforce that all data round-tripping through SerializedBytes is via TryFrom and also allow for custom non-messagepack canonical representations of data types.
Trait Implementations
sourceimpl<'arbitrary> Arbitrary<'arbitrary> for UnsafeBytes
impl<'arbitrary> Arbitrary<'arbitrary> for UnsafeBytes
sourcefn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<UnsafeBytes, Error>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<UnsafeBytes, Error>
Generate an arbitrary value of Self
from the given unstructured data. Read more
sourcefn arbitrary_take_rest(
u: Unstructured<'arbitrary>
) -> Result<UnsafeBytes, Error>
fn arbitrary_take_rest(
u: Unstructured<'arbitrary>
) -> Result<UnsafeBytes, Error>
Generate an arbitrary value of Self
from the entirety of the given unstructured data. Read more
sourceimpl Clone for UnsafeBytes
impl Clone for UnsafeBytes
sourcefn clone(&self) -> UnsafeBytes
fn clone(&self) -> UnsafeBytes
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for UnsafeBytes
impl Debug for UnsafeBytes
sourceimpl From<SerializedBytes> for UnsafeBytes
impl From<SerializedBytes> for UnsafeBytes
sourcefn from(sb: SerializedBytes) -> UnsafeBytes
fn from(sb: SerializedBytes) -> UnsafeBytes
Converts to this type from the input type.
sourceimpl From<UnsafeBytes> for SerializedBytes
impl From<UnsafeBytes> for SerializedBytes
sourcefn from(b: UnsafeBytes) -> SerializedBytes
fn from(b: UnsafeBytes) -> SerializedBytes
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for UnsafeBytes
impl Send for UnsafeBytes
impl Sync for UnsafeBytes
impl Unpin for UnsafeBytes
impl UnwindSafe for UnsafeBytes
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more