#[repr(u32)]
pub enum RightsResolution {
Maximize,
Posix,
}
Variants§
Maximize
The rights will be the intersection between [RightsRequest.at_most
]
and the connection where the Open
/Reopen
request was received,
closing object_request
with ZX_ERR_ACCESS_DENIED
if it is empty.
Posix
The rights will be determined by the following rules:
- If the negotiated protocol on the new connection is
[
Directory
], the rules from theMAXIMIZE
case applies. - Otherwise, the rights will be [
RightsRequest.at_least
] if it does not exceed rights on the current connection. - Otherwise,
object_request
should be closed withZX_ERR_ACCESS_DENIED
.
The motivation for this enum is to facilitate implementing POSIX
compatibility layers. The POSIX file permission model relies on ambient
authority: access control on files are resolved based on the mode
of
the file, and the current user. There is no concept of hierarchical
permissions. Fuchsia, on the other hand, restricts rights on file
connections to never exceed that of its containing directory connection.
Implementations§
source§impl RightsResolution
impl RightsResolution
pub fn from_primitive(prim: u32) -> Option<Self>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
source§impl Clone for RightsResolution
impl Clone for RightsResolution
source§fn clone(&self) -> RightsResolution
fn clone(&self) -> RightsResolution
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RightsResolution
impl Debug for RightsResolution
source§impl Decode<RightsResolution> for RightsResolution
impl Decode<RightsResolution> for RightsResolution
source§impl Encode<RightsResolution> for RightsResolution
impl Encode<RightsResolution> for RightsResolution
source§impl Hash for RightsResolution
impl Hash for RightsResolution
source§impl Ord for RightsResolution
impl Ord for RightsResolution
source§fn cmp(&self, other: &RightsResolution) -> Ordering
fn cmp(&self, other: &RightsResolution) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<RightsResolution> for RightsResolution
impl PartialEq<RightsResolution> for RightsResolution
source§fn eq(&self, other: &RightsResolution) -> bool
fn eq(&self, other: &RightsResolution) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<RightsResolution> for RightsResolution
impl PartialOrd<RightsResolution> for RightsResolution
source§fn partial_cmp(&self, other: &RightsResolution) -> Option<Ordering>
fn partial_cmp(&self, other: &RightsResolution) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TypeMarker for RightsResolution
impl TypeMarker for RightsResolution
§type Owned = RightsResolution
type Owned = RightsResolution
The owned Rust type which this FIDL type decodes into.
source§fn inline_align(context: Context) -> usize
fn inline_align(context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
source§fn inline_size(context: Context) -> usize
fn inline_size(context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
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 moresource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
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 RightsResolution
impl ValueTypeMarker for RightsResolution
§type Borrowed<'a> = <RightsResolution as TypeMarker>::Owned
type Borrowed<'a> = <RightsResolution as TypeMarker>::Owned
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more