Struct catalyzer::internals::content_loader::StringContentLoader
pub struct StringContentLoader(/* private fields */);
Expand description
A content loader for valid UTF-8 strings.
Implementations§
§impl StringContentLoader
impl StringContentLoader
pub const fn new_static(s: &'static str) -> StringContentLoader
pub const fn new_static(s: &'static str) -> StringContentLoader
Creates a new StringContentLoader
from an allocated String
.
pub fn new_alloc(s: String) -> StringContentLoader
pub fn new_alloc(s: String) -> StringContentLoader
Creates a new StringContentLoader
from a static string.
§impl StringContentLoader
impl StringContentLoader
pub async fn from_file<P>(
path: P
) -> Result<StringContentLoader, CatalyzerError>
pub async fn from_file<P>( path: P ) -> Result<StringContentLoader, CatalyzerError>
Creates a new StringContentLoader
from a file.
Trait Implementations§
§impl Clone for StringContentLoader
impl Clone for StringContentLoader
§fn clone(&self) -> StringContentLoader
fn clone(&self) -> StringContentLoader
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 StringContentLoader
impl Debug for StringContentLoader
§impl Display for StringContentLoader
impl Display for StringContentLoader
§impl From<&'static str> for StringContentLoader
impl From<&'static str> for StringContentLoader
§fn from(s: &'static str) -> StringContentLoader
fn from(s: &'static str) -> StringContentLoader
Converts to this type from the input type.
§impl From<String> for StringContentLoader
impl From<String> for StringContentLoader
§fn from(s: String) -> StringContentLoader
fn from(s: String) -> StringContentLoader
Converts to this type from the input type.
§impl From<StringContentLoader> for Body
impl From<StringContentLoader> for Body
§fn from(this: StringContentLoader) -> Body
fn from(this: StringContentLoader) -> Body
Converts to this type from the input type.
§impl Hash for StringContentLoader
impl Hash for StringContentLoader
§impl Ord for StringContentLoader
impl Ord for StringContentLoader
§fn cmp(&self, other: &StringContentLoader) -> Ordering
fn cmp(&self, other: &StringContentLoader) -> 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 StringContentLoader
impl PartialEq for StringContentLoader
§fn eq(&self, other: &StringContentLoader) -> bool
fn eq(&self, other: &StringContentLoader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialOrd for StringContentLoader
impl PartialOrd for StringContentLoader
§fn partial_cmp(&self, other: &StringContentLoader) -> Option<Ordering>
fn partial_cmp(&self, other: &StringContentLoader) -> 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 StringContentLoader
impl StructuralPartialEq for StringContentLoader
Auto Trait Implementations§
impl Freeze for StringContentLoader
impl RefUnwindSafe for StringContentLoader
impl Send for StringContentLoader
impl Sync for StringContentLoader
impl Unpin for StringContentLoader
impl UnwindSafe for StringContentLoader
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