pub struct StateSegmentSpec { /* private fields */ }Expand description
One named contiguous range in an architecture’s state layout.
Implementations§
Source§impl StateSegmentSpec
impl StateSegmentSpec
Sourcepub fn new(
id: impl Into<String>,
layers: Range<usize>,
lifetime: StateSegmentLifetime,
processed_token_offset: i32,
) -> Result<Self, StateError>
pub fn new( id: impl Into<String>, layers: Range<usize>, lifetime: StateSegmentLifetime, processed_token_offset: i32, ) -> Result<Self, StateError>
Creates a non-empty segment range.
Sourcepub const fn id(&self) -> &StateSegmentId
pub const fn id(&self) -> &StateSegmentId
Returns the stable segment identity.
Sourcepub const fn lifetime(&self) -> StateSegmentLifetime
pub const fn lifetime(&self) -> StateSegmentLifetime
Returns whether the segment persists or resets at a frame boundary.
Sourcepub const fn processed_token_offset(&self) -> i32
pub const fn processed_token_offset(&self) -> i32
Returns the segment’s processed-token delta from the persisted prefix.
Trait Implementations§
Source§impl Clone for StateSegmentSpec
impl Clone for StateSegmentSpec
Source§fn clone(&self) -> StateSegmentSpec
fn clone(&self) -> StateSegmentSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StateSegmentSpec
impl Debug for StateSegmentSpec
impl Eq for StateSegmentSpec
Source§impl PartialEq for StateSegmentSpec
impl PartialEq for StateSegmentSpec
impl StructuralPartialEq for StateSegmentSpec
Auto Trait Implementations§
impl Freeze for StateSegmentSpec
impl RefUnwindSafe for StateSegmentSpec
impl Send for StateSegmentSpec
impl Sync for StateSegmentSpec
impl Unpin for StateSegmentSpec
impl UnsafeUnpin for StateSegmentSpec
impl UnwindSafe for StateSegmentSpec
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