Struct BytesContentLoader
pub struct BytesContentLoader(/* private fields */);Expand description
A content loader for bytes.
Implementations§
Source§impl BytesContentLoader
impl BytesContentLoader
Sourcepub 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>.
Sourcepub fn new_alloc(s: Vec<u8>) -> BytesContentLoader
pub fn new_alloc(s: Vec<u8>) -> BytesContentLoader
Creates a new BytesContentLoader from a static byte slice.
Source§impl BytesContentLoader
impl BytesContentLoader
Sourcepub 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§
Source§impl Clone for BytesContentLoader
impl Clone for BytesContentLoader
Source§fn clone(&self) -> BytesContentLoader
fn clone(&self) -> BytesContentLoader
Returns a duplicate 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 Debug for BytesContentLoader
impl Debug for BytesContentLoader
Source§impl Display for BytesContentLoader
impl Display for BytesContentLoader
Source§impl From<&'static [u8]> for BytesContentLoader
impl From<&'static [u8]> for BytesContentLoader
Source§fn from(s: &'static [u8]) -> BytesContentLoader
fn from(s: &'static [u8]) -> BytesContentLoader
Converts to this type from the input type.
Source§impl From<BytesContentLoader> for Body
impl From<BytesContentLoader> for Body
Source§fn from(this: BytesContentLoader) -> Body
fn from(this: BytesContentLoader) -> Body
Converts to this type from the input type.
Source§impl Hash for BytesContentLoader
impl Hash for BytesContentLoader
Source§impl Ord for BytesContentLoader
impl Ord for BytesContentLoader
Source§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
Source§impl PartialEq for BytesContentLoader
impl PartialEq for BytesContentLoader
Source§impl PartialOrd for BytesContentLoader
impl PartialOrd for BytesContentLoader
impl 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