pub struct NamedPipeServerBuilder { /* private fields */ }Expand description
Builder for creating a named pipe server configuration.
Implementations§
Source§impl NamedPipeServerBuilder
impl NamedPipeServerBuilder
Sourcepub fn open_mode(self, open_mode: NamedPipeOpenMode) -> Self
pub fn open_mode(self, open_mode: NamedPipeOpenMode) -> Self
Set the open direction.
Sourcepub fn pipe_type(self, pipe_type: NamedPipeType) -> Self
pub fn pipe_type(self, pipe_type: NamedPipeType) -> Self
Set byte/message semantics.
Sourcepub fn max_instances(self, max_instances: u8) -> Self
pub fn max_instances(self, max_instances: u8) -> Self
Set number of server instances for this pipe name.
Sourcepub fn out_buffer_size(self, out_buffer_size: u32) -> Self
pub fn out_buffer_size(self, out_buffer_size: u32) -> Self
Set outbound buffer size.
Sourcepub fn in_buffer_size(self, in_buffer_size: u32) -> Self
pub fn in_buffer_size(self, in_buffer_size: u32) -> Self
Set inbound buffer size.
Sourcepub fn default_timeout(self, default_timeout: Duration) -> Self
pub fn default_timeout(self, default_timeout: Duration) -> Self
Set default timeout.
Sourcepub fn security(self, security: PipeSecurityOptions) -> Self
pub fn security(self, security: PipeSecurityOptions) -> Self
Set raw security options.
Sourcepub fn allow_executable(self, path: impl Into<PathBuf>) -> Self
pub fn allow_executable(self, path: impl Into<PathBuf>) -> Self
Restrict connections to processes whose executable path matches one of the given paths.
The comparison is case-insensitive. If no paths are added (the default), all processes are allowed to connect.
Sourcepub fn remove_executable(self, path: impl Into<PathBuf>) -> Self
pub fn remove_executable(self, path: impl Into<PathBuf>) -> Self
Remove a previously added executable path from the allow-list.
The comparison is case-insensitive. Does nothing if the path is not present.
Sourcepub fn build(self) -> Result<NamedPipeServerConfig>
pub fn build(self) -> Result<NamedPipeServerConfig>
Build a named pipe server configuration.
Trait Implementations§
Source§impl Clone for NamedPipeServerBuilder
impl Clone for NamedPipeServerBuilder
Source§fn clone(&self) -> NamedPipeServerBuilder
fn clone(&self) -> NamedPipeServerBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NamedPipeServerBuilder
impl Debug for NamedPipeServerBuilder
Auto Trait Implementations§
impl Freeze for NamedPipeServerBuilder
impl RefUnwindSafe for NamedPipeServerBuilder
impl Send for NamedPipeServerBuilder
impl Sync for NamedPipeServerBuilder
impl Unpin for NamedPipeServerBuilder
impl UnsafeUnpin for NamedPipeServerBuilder
impl UnwindSafe for NamedPipeServerBuilder
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