Struct fidl_fuchsia_io::NodeOptions
source · pub struct NodeOptions {
pub flags: Option<NodeFlags>,
pub protocols: Option<NodeProtocols>,
pub mode: Option<CreationMode>,
pub rights: Option<Operations>,
pub attributes: Option<NodeAttributesQuery>,
pub create_attributes: Option<MutableNodeAttributes>,
/* private fields */
}
Expand description
Options used when opening a node.
Fields§
§flags: Option<NodeFlags>
§protocols: Option<NodeProtocols>
Callers may assert the type of the object by setting the protocol corresponding to the expected type:
-
If the caller expected a directory but the node cannot be accessed as a directory, the error is
ZX_ERR_NOT_DIR
. -
If the caller expected a file but the node cannot be accessed as a file, the error is
ZX_ERR_NOT_FILE
. -
In other mismatched cases, and for an empty table, the error is
ZX_ERR_WRONG_TYPE
.
If more than one protocol is present, the resultant protocol may become any one of them.
Callers should specify [NodeFlags.GET_REPRESENTATION
] to receive a
[Node.OnRepresentation
] event, in order to ascertain the protocol.
If absent, indicates that the caller accepts any [Node
] protocol (including [Node
]
itself for connector nodes, for instance).
mode: Option<CreationMode>
Specifies how the target object should be created. If an object is to be created, its type
must be specified by protocols
. The check for existence and creation of the new object
are performed atomically.
If the type is ambiguous (e.g. both directory
and file
are set), the request must fail
with ZX_ERR_INVALID_ARGS
.
rights: Option<Operations>
Requested rights on the new connection.
If [rights
] exceed the rights of the requesting connection then [object_request
] will be
closed with a ZX_ERR_ACCESS_DENIED
epitaph.
This applies in addition to [DirectoryProtocolOptions.optional_rights
].
If absent, inherits appropriate rights from the requesting connection. For example, if using the node protocol, only the GET_ATTRIBUTES right is inherited.
attributes: Option<NodeAttributesQuery>
If the [NodeFlags.GET_REPRESENTATION
] flag is set, attributes to be returned in
[Node.OnRepresentation
]. This requires the [Rights.GET_ATTRIBUTES
] right on the parent
connection, but this is not required on the resulting connection.
create_attributes: Option<MutableNodeAttributes>
If an object is to be created, this specifies attributes that should be stored with the
object at creation time. Servers might not support setting any or all attributes in which
case they will return ZX_ERR_NOT_SUPPORTED
.
Trait Implementations§
source§impl Clone for NodeOptions
impl Clone for NodeOptions
source§fn clone(&self) -> NodeOptions
fn clone(&self) -> NodeOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for NodeOptions
impl Debug for NodeOptions
source§impl Decode<NodeOptions> for NodeOptions
impl Decode<NodeOptions> for NodeOptions
source§impl Default for NodeOptions
impl Default for NodeOptions
source§fn default() -> NodeOptions
fn default() -> NodeOptions
source§impl Encode<NodeOptions> for &NodeOptions
impl Encode<NodeOptions> for &NodeOptions
source§impl PartialEq for NodeOptions
impl PartialEq for NodeOptions
source§fn eq(&self, other: &NodeOptions) -> bool
fn eq(&self, other: &NodeOptions) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl TypeMarker for NodeOptions
impl TypeMarker for NodeOptions
§type Owned = NodeOptions
type Owned = NodeOptions
source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.source§impl ValueTypeMarker for NodeOptions
impl ValueTypeMarker for NodeOptions
§type Borrowed<'a> = &'a NodeOptions
type Borrowed<'a> = &'a NodeOptions
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more