pub struct PageHandle { /* private fields */ }Implementations§
Source§impl PageHandle
impl PageHandle
Sourcepub fn new(
target_id: TargetId,
session_id: SessionId,
opener_id: Option<TargetId>,
request_timeout: Duration,
page_wake: Option<Arc<Notify>>,
) -> Self
pub fn new( target_id: TargetId, session_id: SessionId, opener_id: Option<TargetId>, request_timeout: Duration, page_wake: Option<Arc<Notify>>, ) -> Self
Create a PageHandle with the default per-page channel capacity
(DEFAULT_PAGE_CHANNEL_CAPACITY). Preserved unchanged for
backwards compatibility — call with_capacity to override.
Sourcepub fn with_capacity(
target_id: TargetId,
session_id: SessionId,
opener_id: Option<TargetId>,
request_timeout: Duration,
page_wake: Option<Arc<Notify>>,
capacity: usize,
) -> Self
pub fn with_capacity( target_id: TargetId, session_id: SessionId, opener_id: Option<TargetId>, request_timeout: Duration, page_wake: Option<Arc<Notify>>, capacity: usize, ) -> Self
Create a PageHandle with a caller-chosen channel capacity.
capacity is the tokio mpsc buffer size for TargetMessages flowing
from this page to the handler. Capacity is clamped to at least 1
because tokio::sync::mpsc::channel(0) panics; callers passing 0
get a 1-slot channel instead of an abort.
Under bursty per-page load, larger capacities reduce the rate at
which CommandFuture / TargetMessageFuture fall back to the
boxed async-send slow path on TrySendError::Full; smaller
capacities apply back-pressure sooner at the cost of that fallback.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PageHandle
impl RefUnwindSafe for PageHandle
impl Send for PageHandle
impl Sync for PageHandle
impl Unpin for PageHandle
impl UnsafeUnpin for PageHandle
impl UnwindSafe for PageHandle
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