pub struct ServeOptions {
pub socket_path: PathBuf,
pub max_payload_size: usize,
}Expand description
Configuration for serve.
Fields§
§socket_path: PathBufPath the Unix domain socket binds. The file is unlinked on drop.
max_payload_size: usizeMaximum HTTP request body, in bytes. Mirrors --http-api-max-payload-size.
Implementations§
Source§impl ServeOptions
impl ServeOptions
Sourcepub fn new(socket_path: impl Into<PathBuf>) -> Self
pub fn new(socket_path: impl Into<PathBuf>) -> Self
Build with the Firecracker-compatible default body limit.
Sourcepub fn with_max_payload_size(self, bytes: usize) -> Self
pub fn with_max_payload_size(self, bytes: usize) -> Self
Override the body limit; matches the --http-api-max-payload-size CLI flag.
The value is clamped into [MIN_MAX_PAYLOAD, MAX_MAX_PAYLOAD].
Trait Implementations§
Source§impl Clone for ServeOptions
impl Clone for ServeOptions
Source§fn clone(&self) -> ServeOptions
fn clone(&self) -> ServeOptions
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 ServeOptions
impl RefUnwindSafe for ServeOptions
impl Send for ServeOptions
impl Sync for ServeOptions
impl Unpin for ServeOptions
impl UnsafeUnpin for ServeOptions
impl UnwindSafe for ServeOptions
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