pub struct PortableFormatImage { /* private fields */ }Implementations§
Source§impl PortableFormatImage
impl PortableFormatImage
pub fn empty() -> Self
Sourcepub fn validation_tag() -> [u8; 17]
pub fn validation_tag() -> [u8; 17]
Returns the same-target validation tag stored at the start of every image.
Sourcepub fn bytes_match_target(bytes: &[u8]) -> bool
pub fn bytes_match_target(bytes: &[u8]) -> bool
Reports whether a serialized image carries this build target’s validation tag.
Sourcepub fn from_static_bytes(bytes: &'static [u8]) -> Option<Self>
pub fn from_static_bytes(bytes: &'static [u8]) -> Option<Self>
Borrows a static serialized image without allocating or copying its contents.
Sourcepub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bytes(&self) -> Vec<u8> ⓘ
Serialize this format image to a portable byte buffer (a dumped .fmt)
that Self::from_bytes can reload. Same-target only — see
[PortableTexState::to_portable_bytes].
Sourcepub fn from_bytes(bytes: &[u8]) -> Option<Self>
pub fn from_bytes(bytes: &[u8]) -> Option<Self>
Reload a format image previously produced by Self::to_bytes. Returns
None if the buffer is not a format image for this build target.
Sourcepub fn state_array_bytes(&self) -> usize
pub fn state_array_bytes(&self) -> usize
Resident bytes of the engine’s dynamic arrays once instantiated from this image — the dominant runtime memory footprint.
Trait Implementations§
Auto Trait Implementations§
impl !Send for PortableFormatImage
impl !Sync for PortableFormatImage
impl Freeze for PortableFormatImage
impl RefUnwindSafe for PortableFormatImage
impl Unpin for PortableFormatImage
impl UnsafeUnpin for PortableFormatImage
impl UnwindSafe for PortableFormatImage
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