Module common

Source
Expand description

Common utilities used by both directory and file traits.

Macros§

attribute_query
Converts a lower-case attribute name into the appropriate NodeAttributesQuery flag. This is used by the attributes! macro.

Enums§

CreationMode
Represents if and how objects should be created with an open request.

Traits§

IntoAny
Trait to be used as a supertrait when an object should allow dynamic casting to an Any.

Functions§

decode_extended_attribute_value
encode_extended_attribute_value
extended_attributes_sender
inherit_rights_for_clone
Common logic for rights processing during cloning a node, shared by both file and directory implementations.
io2_to_io1_attrs
Used to translate fuchsia.io/Node.GetAttributes calls (io2) to fuchsia.io/Node.GetAttrs (io1). We don’t return a Result since the fuchsia.io/Node.GetAttrs method doesn’t use FIDL errors, and thus requires we return a status code and set of default attributes for the failure case.
mutable_node_attributes_to_query
rights_to_posix_mode_bits
Returns equivalent POSIX mode/permission bits based on the specified rights. Note that these only set the user bits.
send_on_open_with_error
A helper method to send OnOpen event on the handle owned by the server_end in case flags contains OPEN_FLAG_STATUS.
stricter_or_same_rights
Returns true if the rights flags in flags do not exceed those in parent_flags.