Enum fidl_fuchsia_io::NodeRequest
source · pub enum NodeRequest {
Show 13 variants
Clone {
flags: OpenFlags,
object: ServerEnd<NodeMarker>,
control_handle: NodeControlHandle,
},
GetAttr {
responder: NodeGetAttrResponder,
},
SetAttr {
flags: NodeAttributeFlags,
attributes: NodeAttributes,
responder: NodeSetAttrResponder,
},
GetFlags {
responder: NodeGetFlagsResponder,
},
SetFlags {
flags: OpenFlags,
responder: NodeSetFlagsResponder,
},
QueryFilesystem {
responder: NodeQueryFilesystemResponder,
},
Close {
responder: NodeCloseResponder,
},
Query {
responder: NodeQueryResponder,
},
Reopen {
rights_request: Option<Box<RightsRequest>>,
object_request: ServerEnd<NodeMarker>,
control_handle: NodeControlHandle,
},
GetConnectionInfo {
responder: NodeGetConnectionInfoResponder,
},
GetAttributes {
query: NodeAttributesQuery,
responder: NodeGetAttributesResponder,
},
UpdateAttributes {
payload: MutableNodeAttributes,
responder: NodeUpdateAttributesResponder,
},
Sync {
responder: NodeSyncResponder,
},
}
Variants§
Clone
Create another connection to the same remote object.
flags
may be any of:
OpenFlags.RIGHT_*
OpenFlags.APPEND
OpenFlags.DESCRIBE
OpenFlags.CLONE_SAME_RIGHTS
All other flags are ignored.
The OpenFlags.RIGHT_*
bits in flags
request corresponding rights over the resulting
cloned object.
The cloned object must have rights less than or equal to the original object, otherwise
returns ZX_ERR_ACCESS_DENIED
.
Alternatively, pass OpenFlags.CLONE_SAME_RIGHTS
to inherit the rights on the source connection.
It is invalid to pass any of the OpenFlags.RIGHT_*
flags together with
OpenFlags.CLONE_SAME_RIGHTS
.
GetAttr
Fields
responder: NodeGetAttrResponder
Acquires information about the node.
This method does not require any rights.
SetAttr
Updates information about the node.
This method requires following rights: OpenFlags.RIGHT_WRITABLE
, otherwise returns
ZX_ERR_BAD_HANDLE
.
GetFlags
Fields
responder: NodeGetFlagsResponder
Acquires the Directory.Open
rights and flags used to access this file.
This method does not require any rights.
SetFlags
Changes the Directory.Open
flags used to access the file.
Supported flags which can be turned on / off:
OpenFlags.APPEND
This method does not require any rights.
QueryFilesystem
Fields
responder: NodeQueryFilesystemResponder
Query the filesystem for filesystem-specific information.
Close
Fields
responder: NodeCloseResponder
Terminates the connection.
After calling Close
, the client must not send any other requests.
Servers, after sending the status response, should close the connection regardless of status and without sending an epitaph.
Closing the client end of the channel should be semantically equivalent
to calling Close
without knowing when the close has completed or its
status.
Query
Fields
responder: NodeQueryResponder
Reopen
Fields
rights_request: Option<Box<RightsRequest>>
object_request: ServerEnd<NodeMarker>
control_handle: NodeControlHandle
Creates another connection to the same node.
object_request
is the server end of a channel created for the new connection. The caller may proceed to send messages on the corresponding client end right away.
GetConnectionInfo
Fields
responder: NodeGetConnectionInfoResponder
Acquires information about the connection.
This method does not require any rights.
GetAttributes
Acquires information about the node.
The attributes of a node should be stable, independent of the specific protocol used to access it.
If a particular attribute is not applicable or not supported, filesystems should leave the corresponding field absent.
query
a bit-mask specifying which attributes to fetch. The server should not return more than necessary.
attributes
the returned attributes.
This method requires the [Rights.GET_ATTRIBUTES
] right.
UpdateAttributes
Updates information about the node.
attributes
the presence of a table field inattributes
indicates the intent to update the corresponding attribute.
This method requires the [Rights.UPDATE_ATTRIBUTES
] right.
Sync
Fields
responder: NodeSyncResponder
Synchronizes updates to the node to the underlying media, if it exists.
This method will return when the filesystem server has flushed the
relevant updates to the underlying media, but does not guarantee the
underlying media has persisted the information, nor that any information
is committed to hardware. Clients may use Sync
to ensure ordering
between operations.
This method does not require any rights.
Implementations§
source§impl NodeRequest
impl NodeRequest
pub fn into_clone( self ) -> Option<(OpenFlags, ServerEnd<NodeMarker>, NodeControlHandle)>
pub fn into_get_attr(self) -> Option<NodeGetAttrResponder>
pub fn into_set_attr( self ) -> Option<(NodeAttributeFlags, NodeAttributes, NodeSetAttrResponder)>
pub fn into_get_flags(self) -> Option<NodeGetFlagsResponder>
pub fn into_set_flags(self) -> Option<(OpenFlags, NodeSetFlagsResponder)>
pub fn into_query_filesystem(self) -> Option<NodeQueryFilesystemResponder>
pub fn into_close(self) -> Option<NodeCloseResponder>
pub fn into_query(self) -> Option<NodeQueryResponder>
pub fn into_reopen( self ) -> Option<(Option<Box<RightsRequest>>, ServerEnd<NodeMarker>, NodeControlHandle)>
pub fn into_get_connection_info(self) -> Option<NodeGetConnectionInfoResponder>
pub fn into_get_attributes( self ) -> Option<(NodeAttributesQuery, NodeGetAttributesResponder)>
pub fn into_update_attributes( self ) -> Option<(MutableNodeAttributes, NodeUpdateAttributesResponder)>
pub fn into_sync(self) -> Option<NodeSyncResponder>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL