pub struct FrozenSegment { /* private fields */ }Expand description
One frozen segment: static bytes from frozen sources, hashed at
construction. The sole constructor takes bytes, not values — there is
deliberately no From<TimeMs> or any other volatile conversion.
Implementations§
Source§impl FrozenSegment
impl FrozenSegment
Sourcepub fn new(slot: SegmentSlot, bytes: Vec<u8>) -> FrozenSegment
pub fn new(slot: SegmentSlot, bytes: Vec<u8>) -> FrozenSegment
A segment whose bytes name no documents - the resident slot is built from an identity and a catalog rather than from files.
Sourcepub fn assembled(
slot: SegmentSlot,
bytes: Vec<u8>,
sources: Vec<SegmentSource>,
) -> FrozenSegment
pub fn assembled( slot: SegmentSlot, bytes: Vec<u8>, sources: Vec<SegmentSource>, ) -> FrozenSegment
A segment and the documents it was assembled from, which is what
prompt_assembled records and what a page shows a person.
pub fn sources(&self) -> &[SegmentSource]
pub fn slot(&self) -> SegmentSlot
pub fn hash(&self) -> &B3Hash
pub fn bytes(&self) -> &[u8] ⓘ
Trait Implementations§
Source§impl Clone for FrozenSegment
impl Clone for FrozenSegment
Source§impl Debug for FrozenSegment
impl Debug for FrozenSegment
impl Eq for FrozenSegment
Source§impl PartialEq for FrozenSegment
impl PartialEq for FrozenSegment
impl StructuralPartialEq for FrozenSegment
Auto Trait Implementations§
impl Freeze for FrozenSegment
impl RefUnwindSafe for FrozenSegment
impl Send for FrozenSegment
impl Sync for FrozenSegment
impl Unpin for FrozenSegment
impl UnsafeUnpin for FrozenSegment
impl UnwindSafe for FrozenSegment
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