vfs::common

Function send_on_open_with_error

Source
pub fn send_on_open_with_error(
    describe: bool,
    server_end: ServerEnd<NodeMarker>,
    status: Status,
)
Expand description

A helper method to send OnOpen event on the handle owned by the server_end in case flags contains OPEN_FLAG_STATUS.

If the send operation fails for any reason, the error is ignored. This helper is used during an Open() or a Clone() FIDL methods, and these methods have no means to propagate errors to the caller. OnOpen event is the only way to do that, so there is nowhere to report errors in OnOpen dispatch. server_end will be closed, so there will be some kind of indication of the issue.

ยงPanics

If status is Status::OK. In this case OnOpen may need to contain a description of the object, and server_end should not be dropped.