pub struct FileMessage {
pub id: u64,
pub offset: u64,
}Expand description
A 16-byte profile entry identifying a file by a numeric id (Fxfs object ID or mapper session
key) and a logical byte offset.
Fields§
§id: u64§offset: u64Readahead-aligned logical byte offset within the file. Only the start offset (without
length) is stored because replay prefetches a single page at offset and relies on the
pager’s readahead to fault in the full window.
Trait Implementations§
Source§impl Clone for FileMessage
impl Clone for FileMessage
impl Copy for FileMessage
Source§impl Debug for FileMessage
impl Debug for FileMessage
impl Eq for FileMessage
Source§impl Hash for FileMessage
impl Hash for FileMessage
Source§impl Message for FileMessage
impl Message for FileMessage
type IdType = u64
fn id(&self) -> Self::IdType
fn offset(&self) -> u64
fn encode_to(&self, dest: MutPtrByteSlice<'_>)
fn decode_from(src: PtrByteSlice<'_>) -> Self
fn is_zeroes(&self) -> bool
fn is_open_marker(&self) -> bool
Source§fn encode_to_vmo(
messages: impl IntoIterator<Item = impl Borrow<Self>>,
block_size: usize,
) -> Result<Vmo, Status>
fn encode_to_vmo( messages: impl IntoIterator<Item = impl Borrow<Self>>, block_size: usize, ) -> Result<Vmo, Status>
Encodes
messages into a new zx::Vmo packed into block_size-aligned blocks (typically
4 KiB) without crossing block_size boundaries. Any trailing bytes in a block that cannot
fit a full message are zero-padded.Source§fn decode_from_vmo(
vmo: Vmo,
block_size: usize,
) -> Result<DecodedMessageIter<Self>, Status>
fn decode_from_vmo( vmo: Vmo, block_size: usize, ) -> Result<DecodedMessageIter<Self>, Status>
Returns an iterator that lazily decodes messages from
vmo one block_size-aligned block
at a time. An all-zero message (Self::is_zeroes()) marks the end of the recorded stream.Source§impl PartialEq for FileMessage
impl PartialEq for FileMessage
impl StructuralPartialEq for FileMessage
Auto Trait Implementations§
impl Freeze for FileMessage
impl RefUnwindSafe for FileMessage
impl Send for FileMessage
impl Sync for FileMessage
impl Unpin for FileMessage
impl UnsafeUnpin for FileMessage
impl UnwindSafe for FileMessage
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