pub struct StorageReadControl { /* private fields */ }Implementations§
Source§impl StorageReadControl
impl StorageReadControl
pub fn with_limit(limit: usize) -> Self
pub fn new(memory: &MemoryBudget, cancellation: &CancellationToken) -> Self
pub fn memory(&self) -> &MemoryBudget
pub fn cancellation(&self) -> &CancellationToken
pub fn check(&self) -> StorageBackendResult<()>
Sourcepub fn check_value_size(
&self,
bytes: usize,
maximum: usize,
) -> StorageBackendResult<()>
pub fn check_value_size( &self, bytes: usize, maximum: usize, ) -> StorageBackendResult<()>
Validate an encoded value’s size before materializing it. Provider workspace and returned bytes still share this control’s memory allowance.
Trait Implementations§
Source§impl Clone for StorageReadControl
impl Clone for StorageReadControl
Auto Trait Implementations§
impl Freeze for StorageReadControl
impl RefUnwindSafe for StorageReadControl
impl Send for StorageReadControl
impl Sync for StorageReadControl
impl Unpin for StorageReadControl
impl UnsafeUnpin for StorageReadControl
impl UnwindSafe for StorageReadControl
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