pub struct OversizedSenderOptions {
pub progress_token: String,
pub chunk_size_bytes: usize,
pub needs_accept_handshake: bool,
}Expand description
Options controlling how a payload is split into frames.
Fields§
§progress_token: StringThe MCP progressToken stamped on every frame in the transfer.
chunk_size_bytes: usizePer-chunk byte size. Defaults to DEFAULT_CHUNK_SIZE.
needs_accept_handshake: boolWhether to reserve the accept slot (progress 2) for a handshake, so the
first chunk starts at progress 3. When false, chunks start at 2.
Implementations§
Source§impl OversizedSenderOptions
impl OversizedSenderOptions
Sourcepub fn new(progress_token: impl Into<String>) -> Self
pub fn new(progress_token: impl Into<String>) -> Self
Create options for progress_token with default chunk size and no handshake.
Sourcepub fn with_chunk_size(self, chunk_size_bytes: usize) -> Self
pub fn with_chunk_size(self, chunk_size_bytes: usize) -> Self
Override the per-chunk byte size.
Sourcepub fn with_accept_handshake(self, needs_accept_handshake: bool) -> Self
pub fn with_accept_handshake(self, needs_accept_handshake: bool) -> Self
Set whether the accept handshake slot is reserved.
Trait Implementations§
Source§impl Clone for OversizedSenderOptions
impl Clone for OversizedSenderOptions
Source§fn clone(&self) -> OversizedSenderOptions
fn clone(&self) -> OversizedSenderOptions
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 moreAuto Trait Implementations§
impl Freeze for OversizedSenderOptions
impl RefUnwindSafe for OversizedSenderOptions
impl Send for OversizedSenderOptions
impl Sync for OversizedSenderOptions
impl Unpin for OversizedSenderOptions
impl UnsafeUnpin for OversizedSenderOptions
impl UnwindSafe for OversizedSenderOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more