[−][src]Struct untyped_bytes::UntypedBytes
Methods
impl UntypedBytes
[src]
pub fn new() -> Self
[src]
pub fn with_capacity(capacity: usize) -> Self
[src]
pub fn from_vec<T: Copy + 'static>(value: Vec<T>) -> Self
[src]
Effectively a mem::transmute
.
pub fn from_slice<T, V>(value: V) -> Self where
T: Copy + Send + Sync + 'static,
V: Borrow<[T]>,
[src]
T: Copy + Send + Sync + 'static,
V: Borrow<[T]>,
pub fn is_empty(&self) -> bool
[src]
pub fn len(&self) -> usize
[src]
pub fn clear(&mut self)
[src]
pub fn push<T: Copy + Send + Sync + 'static>(&mut self, value: T)
[src]
pub fn extend_from_slice<T, V>(&mut self, value: V) where
T: Copy + Send + Sync + 'static,
V: Borrow<[T]>,
[src]
T: Copy + Send + Sync + 'static,
V: Borrow<[T]>,
pub unsafe fn as_slice(&self) -> &[u8]
[src]
Returns a slice that is unsafe to inspect in the presence of padding bytes, but is safe to
memcpy
. Additionally, alignment of the returned slice is the same as
mem::align_of::<u8>()
.
pub unsafe fn cast<T: Copy + Send + Sync + 'static>(&self) -> T
[src]
Casts the backing bytes to a value of type T
. This is only safe the backing bytes were
created from a value of type T
.
Trait Implementations
impl<T: Copy + Send + Sync + 'static> From<T> for UntypedBytes
[src]
impl<A: Copy + Send + Sync + 'static> Extend<A> for UntypedBytes
[src]
fn extend<T: IntoIterator<Item = A>>(&mut self, value: T)
[src]
impl Clone for UntypedBytes
[src]
fn clone(&self) -> UntypedBytes
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for UntypedBytes
[src]
fn default() -> UntypedBytes
[src]
impl Debug for UntypedBytes
[src]
Auto Trait Implementations
impl Send for UntypedBytes
impl Sync for UntypedBytes
impl Unpin for UntypedBytes
impl UnwindSafe for UntypedBytes
impl RefUnwindSafe for UntypedBytes
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,