Struct catalyzer::internals::content_loader::BytesContentLoader
pub struct BytesContentLoader(/* private fields */);
Expand description
A content loader for bytes.
Implementations§
§impl BytesContentLoader
impl BytesContentLoader
pub const fn new_static(s: &'static [u8]) -> BytesContentLoader
pub const fn new_static(s: &'static [u8]) -> BytesContentLoader
Creates a new BytesContentLoader
from an allocated Vec<u8>
.
pub fn new_alloc(s: Vec<u8>) -> BytesContentLoader
pub fn new_alloc(s: Vec<u8>) -> BytesContentLoader
Creates a new BytesContentLoader
from a static byte slice.
§impl BytesContentLoader
impl BytesContentLoader
pub async fn from_file<P>(path: P) -> Result<BytesContentLoader, CatalyzerError>
pub async fn from_file<P>(path: P) -> Result<BytesContentLoader, CatalyzerError>
Creates a new BytesContentLoader
from a file.
Trait Implementations§
§impl Clone for BytesContentLoader
impl Clone for BytesContentLoader
§fn clone(&self) -> BytesContentLoader
fn clone(&self) -> BytesContentLoader
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 more§impl Debug for BytesContentLoader
impl Debug for BytesContentLoader
§impl Display for BytesContentLoader
impl Display for BytesContentLoader
§impl From<&'static [u8]> for BytesContentLoader
impl From<&'static [u8]> for BytesContentLoader
§fn from(s: &'static [u8]) -> BytesContentLoader
fn from(s: &'static [u8]) -> BytesContentLoader
Converts to this type from the input type.
§impl From<BytesContentLoader> for Body
impl From<BytesContentLoader> for Body
§fn from(this: BytesContentLoader) -> Body
fn from(this: BytesContentLoader) -> Body
Converts to this type from the input type.
§impl From<Vec<u8>> for BytesContentLoader
impl From<Vec<u8>> for BytesContentLoader
§fn from(s: Vec<u8>) -> BytesContentLoader
fn from(s: Vec<u8>) -> BytesContentLoader
Converts to this type from the input type.
§impl Hash for BytesContentLoader
impl Hash for BytesContentLoader
§impl Ord for BytesContentLoader
impl Ord for BytesContentLoader
§fn cmp(&self, other: &BytesContentLoader) -> Ordering
fn cmp(&self, other: &BytesContentLoader) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
§impl PartialEq for BytesContentLoader
impl PartialEq for BytesContentLoader
§fn eq(&self, other: &BytesContentLoader) -> bool
fn eq(&self, other: &BytesContentLoader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialOrd for BytesContentLoader
impl PartialOrd for BytesContentLoader
§fn partial_cmp(&self, other: &BytesContentLoader) -> Option<Ordering>
fn partial_cmp(&self, other: &BytesContentLoader) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for BytesContentLoader
impl StructuralPartialEq for BytesContentLoader
Auto Trait Implementations§
impl Freeze for BytesContentLoader
impl RefUnwindSafe for BytesContentLoader
impl Send for BytesContentLoader
impl Sync for BytesContentLoader
impl Unpin for BytesContentLoader
impl UnwindSafe for BytesContentLoader
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