Struct fidl::server::ServeInner
source · pub struct ServeInner { /* private fields */ }
Expand description
A type used from the innards of server implementations
Implementations§
source§impl ServeInner
impl ServeInner
sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new set of server innards.
sourcepub fn channel(&self) -> &AsyncChannel
pub fn channel(&self) -> &AsyncChannel
Get a reference to the inner channel.
sourcepub fn into_channel(self) -> AsyncChannel
pub fn into_channel(self) -> AsyncChannel
Converts the [ServerInner
] back into a channel.
Warning: This operation is dangerous, since the returned channel could have unread messages intended for this server. Use it carefully.
sourcepub fn shutdown_with_epitaph(&self, status: Status)
pub fn shutdown_with_epitaph(&self, status: Status)
Set the server to shutdown with an epitaph.
sourcepub fn poll_shutdown(&self, cx: &mut Context<'_>) -> bool
pub fn poll_shutdown(&self, cx: &mut Context<'_>) -> bool
Check if the server has been set to shutdown.
sourcepub fn send<T: TypeMarker, const OVERFLOWABLE: bool>(
&self,
body: impl Encode<T>,
tx_id: u32,
ordinal: u64,
dynamic_flags: DynamicFlags
) -> Result<(), Error>
pub fn send<T: TypeMarker, const OVERFLOWABLE: bool>( &self, body: impl Encode<T>, tx_id: u32, ordinal: u64, dynamic_flags: DynamicFlags ) -> Result<(), Error>
Send an encodable message to the client.
sourcepub fn send_raw_msg(
&self,
bytes: &[u8],
handles: &mut Vec<HandleDisposition<'_>>
) -> Result<(), Error>
pub fn send_raw_msg( &self, bytes: &[u8], handles: &mut Vec<HandleDisposition<'_>> ) -> Result<(), Error>
Send a raw message to the client.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ServeInner
impl Send for ServeInner
impl Sync for ServeInner
impl Unpin for ServeInner
impl !UnwindSafe for ServeInner
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