Struct OutboxPageRequest
pub struct OutboxPageRequest { /* private fields */ }Expand description
Input to one bounded study-scoped outbox-history read.
Implementations§
§impl OutboxPageRequest
impl OutboxPageRequest
pub const fn new(study: StudyId, max_records: usize, max_bytes: usize) -> Self
pub const fn new(study: StudyId, max_records: usize, max_bytes: usize) -> Self
Creates a request with explicit positive record and byte limits.
Invalid bounds are retained in the value so callers can construct a
request without a fallible builder; TrialLifecycleStorage
rejects them with Error::ResourceLimit. Self::try_new is the
validating constructor.
pub const fn defaults(study: StudyId) -> Self
pub const fn defaults(study: StudyId) -> Self
Creates a request using the finite default page bounds.
pub fn try_new(
study: StudyId,
max_records: usize,
max_bytes: usize,
) -> Result<Self>
pub fn try_new( study: StudyId, max_records: usize, max_bytes: usize, ) -> Result<Self>
Creates and validates a bounded request.
§Errors
Returns Error::ResourceLimit when either bound is zero or uses the
reserved usize::MAX sentinel.
pub const fn with_after(self, after: OutboxCursor) -> Self
pub const fn with_after(self, after: OutboxCursor) -> Self
Sets the continuation cursor for a later page.
pub const fn with_limits(self, max_records: usize, max_bytes: usize) -> Self
pub const fn with_limits(self, max_records: usize, max_bytes: usize) -> Self
Replaces both page limits.
pub const fn with_max_records(self, max_records: usize) -> Self
pub const fn with_max_records(self, max_records: usize) -> Self
Replaces the maximum number of records.
pub const fn with_max_bytes(self, max_bytes: usize) -> Self
pub const fn with_max_bytes(self, max_bytes: usize) -> Self
Replaces the encoded-byte budget.
pub const fn after(&self) -> Option<OutboxCursor>
pub const fn after(&self) -> Option<OutboxCursor>
The optional stateless continuation cursor.
pub const fn max_records(&self) -> usize
pub const fn max_records(&self) -> usize
The maximum number of records to return.
pub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validates the positive local bounds.
§Errors
Returns Error::ResourceLimit when either bound is zero or uses the
reserved usize::MAX sentinel. Bounds must remain finite so backend
checked arithmetic can account for them.
Trait Implementations§
§impl Clone for OutboxPageRequest
impl Clone for OutboxPageRequest
§fn clone(&self) -> OutboxPageRequest
fn clone(&self) -> OutboxPageRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more