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
DEPRECATED - Use fuchsia.io/Flags + fuchsia.io/Options instead.
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 any [rights
] exceed those of the current
connection, [object_request
] will be closed with ZX_ERR_ACCESS_DENIED
.
The rights granted to the connection will be downscoped to those operations the target
node type supports. For example, if the target node is a file and both
[Rights.WRITE_BYTES
] and [Rights.MODIFY_DIRECTORY
] are requested, the resulting
connection will only be granted [Rights.WRITE_BYTES
].
If the rights field is absent, it is the equivalent of empty rights.
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 not 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. This requires the [Rights.UPDATE_ATTRIBUTES
] right on the parent
connection, but not the resulting connection. Requests will fail with ZX_ERR_NOT_SUPPORTED
if any specified attributes are 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<D: ResourceDialect> Decode<NodeOptions, D> for NodeOptions
impl<D: ResourceDialect> Decode<NodeOptions, D> for NodeOptions
source§impl Default for NodeOptions
impl Default for NodeOptions
source§fn default() -> NodeOptions
fn default() -> NodeOptions
source§impl<D: ResourceDialect> Encode<NodeOptions, D> for &NodeOptions
impl<D: ResourceDialect> Encode<NodeOptions, D> 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 moreimpl Persistable for NodeOptions
impl StructuralPartialEq for NodeOptions
Auto Trait Implementations§
impl Freeze for NodeOptions
impl RefUnwindSafe for NodeOptions
impl Send for NodeOptions
impl Sync for NodeOptions
impl Unpin for NodeOptions
impl UnwindSafe for NodeOptions
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)