Struct BytesContentPathPredicate

Source
pub struct BytesContentPathPredicate(/* private fields */);
Available on crate feature assert only.
Expand description

Adapter used by IntoUtf8PathPredicate for static byte slices.

§Example

use camino_tempfile_ext::prelude::*;

let temp = Utf8TempDir::new().unwrap();
let input_file = temp.child("foo.txt");
input_file.touch().unwrap();

// ... do something with input_file ...

input_file.assert(b""); // uses BytesContentPathPredicate

temp.close().unwrap();

Trait Implementations§

Source§

impl Debug for BytesContentPathPredicate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for BytesContentPathPredicate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl IntoUtf8PathPredicate<BytesContentPathPredicate> for &'static [u8]

Source§

type Predicate = BytesContentPathPredicate

The type of the predicate being returned.
Source§

fn into_path(self) -> Self::Predicate

Convert to a predicate for testing a path.
Source§

impl<const N: usize> IntoUtf8PathPredicate<BytesContentPathPredicate> for &'static [u8; N]

Source§

type Predicate = BytesContentPathPredicate

The type of the predicate being returned.
Source§

fn into_path(self) -> Self::Predicate

Convert to a predicate for testing a path.
Source§

impl Predicate<Utf8Path> for BytesContentPathPredicate

Source§

fn eval(&self, item: &Utf8Path) -> bool

Execute this Predicate against variable, returning the resulting boolean.
Source§

fn find_case<'a>( &'a self, expected: bool, variable: &Utf8Path, ) -> Option<Case<'a>>

Find a case that proves this predicate as expected when run against variable.
Source§

impl PredicateReflection for BytesContentPathPredicate

Source§

fn children<'a>(&'a self) -> Box<dyn Iterator<Item = Child<'a>> + 'a>

Nested Predicates of the current Predicate.

Source§

fn parameters<'a>(&'a self) -> Box<dyn Iterator<Item = Parameter<'a>> + 'a>

Parameters of the current Predicate.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P> IntoUtf8PathPredicate<P> for P
where P: Predicate<Utf8Path>,

Source§

type Predicate = P

Available on crate feature assert only.
The type of the predicate being returned.
Source§

fn into_path(self) -> <P as IntoUtf8PathPredicate<P>>::Predicate

Available on crate feature assert only.
Convert to a predicate for testing a path.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<P, Item> PredicateBooleanExt<Item> for P
where P: Predicate<Item>, Item: ?Sized,

§

fn and<B>(self, other: B) -> AndPredicate<Self, B, Item>
where B: Predicate<Item>, Self: Sized,

Compute the logical AND of two Predicate results, returning the result. Read more
§

fn or<B>(self, other: B) -> OrPredicate<Self, B, Item>
where B: Predicate<Item>, Self: Sized,

Compute the logical OR of two Predicate results, returning the result. Read more
§

fn not(self) -> NotPredicate<Self, Item>
where Self: Sized,

Compute the logical NOT of a Predicate, returning the result. Read more
§

impl<P, Item> PredicateBoxExt<Item> for P
where P: Predicate<Item>, Item: ?Sized,

§

fn boxed(self) -> BoxPredicate<Item>
where Self: Sized + Send + Sync + 'static,

Returns a BoxPredicate wrapper around this Predicate type. Read more
§

impl<P, Item> PredicateNameExt<Item> for P
where P: Predicate<Item>, Item: ?Sized,

§

fn name(self, name: &'static str) -> NamePredicate<Self, Item>
where Self: Sized,

Name a predicate expression. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.