#[non_exhaustive]pub struct MemoryIncludes { /* private fields */ }Expand description
The files of one archive (a PBO) as an include source, for input that must never reach the file system.
origin of the preprocessed input is the name of the including entry, and an include is resolved
relative to the folder of that entry, or, in the engine’s \prefix\path form, when it points into
prefix. Absolute paths and drive letters are errors, as are empty components and control characters
(see crate::pbo::safe_relative_path). In the relative form a .. component is resolved inside the PBO and one that would leave
the PBO’s root is an error; in the \prefix\path form .. is always an error. Names compare ignoring case. The files
an #include pulls in count against a total of 64 MiB per preprocess call.
Implementations§
Source§impl MemoryIncludes
impl MemoryIncludes
Sourcepub fn new(prefix: &str, files: Vec<(String, Vec<u8>)>) -> Self
pub fn new(prefix: &str, files: Vec<(String, Vec<u8>)>) -> Self
An include source over files (name, content) of an archive with the given prefix (may be empty).
The first of several entries with the same name (ignoring case and separator) wins.
Sourcepub fn with_unreadable(self, entries: Vec<(String, String)>) -> Self
pub fn with_unreadable(self, entries: Vec<(String, String)>) -> Self
Adds entries (name, reason) that exist in the archive but could not be read. An #include of one of
them fails with the reason instead of “not found”. A name that is also a readable file stays readable.
Trait Implementations§
Source§impl Clone for MemoryIncludes
impl Clone for MemoryIncludes
Source§fn clone(&self) -> MemoryIncludes
fn clone(&self) -> MemoryIncludes
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MemoryIncludes
impl Debug for MemoryIncludes
Source§impl Default for MemoryIncludes
impl Default for MemoryIncludes
Source§fn default() -> MemoryIncludes
fn default() -> MemoryIncludes
Auto Trait Implementations§
impl Freeze for MemoryIncludes
impl RefUnwindSafe for MemoryIncludes
impl Send for MemoryIncludes
impl Sync for MemoryIncludes
impl Unpin for MemoryIncludes
impl UnsafeUnpin for MemoryIncludes
impl UnwindSafe for MemoryIncludes
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().