Enum StorageVariant
#[repr(u8)]pub enum StorageVariant {
Data = 0,
Cache = 1,
Tmp = 2,
CustomArtifacts = 3,
}
Variants§
Data = 0
The data
storage capability variant.
Cache = 1
The cache
storage capability variant.
Tmp = 2
The tmp
storage capability variant.
CustomArtifacts = 3
The custom_artifacts
storage capability variant.
NB: due to the fact that per-component isolated storage is
destroyed along with the component, the custom_artifacts
storage capability is actually proxied as a directory
capability to components created in a ManagedRealm
, in order
to ensure that artifacts are not destroyed when the realm is
torn down and can be extracted by the test framework. This
implies that a component that would like to use
custom_artifacts
must use it as a directory rather than a
storage capability.
The netemul sandbox routes a separate subdirectory of its
custom_artifacts
storage to each component that requests it to
ensure per-component isolation.
Implementations§
§impl StorageVariant
impl StorageVariant
pub fn from_primitive(prim: u8) -> Option<StorageVariant>
pub const fn into_primitive(self) -> u8
pub fn is_unknown(&self) -> bool
is_unknown
Trait Implementations§
§impl Clone for StorageVariant
impl Clone for StorageVariant
§fn clone(&self) -> StorageVariant
fn clone(&self) -> StorageVariant
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for StorageVariant
impl Debug for StorageVariant
§impl<D> Decode<StorageVariant, D> for StorageVariantwhere
D: ResourceDialect,
impl<D> Decode<StorageVariant, D> for StorageVariantwhere
D: ResourceDialect,
§fn new_empty() -> StorageVariant
fn new_empty() -> StorageVariant
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<StorageVariant, D> for StorageVariantwhere
D: ResourceDialect,
impl<D> Encode<StorageVariant, D> for StorageVariantwhere
D: ResourceDialect,
§impl Hash for StorageVariant
impl Hash for StorageVariant
§impl Ord for StorageVariant
impl Ord for StorageVariant
§impl PartialEq for StorageVariant
impl PartialEq for StorageVariant
§impl PartialOrd for StorageVariant
impl PartialOrd for StorageVariant
§impl TypeMarker for StorageVariant
impl TypeMarker for StorageVariant
§type Owned = StorageVariant
type Owned = StorageVariant
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§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.§impl ValueTypeMarker for StorageVariant
impl ValueTypeMarker for StorageVariant
§type Borrowed<'a> = StorageVariant
type Borrowed<'a> = StorageVariant
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<StorageVariant as TypeMarker>::Owned,
) -> <StorageVariant as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<StorageVariant as TypeMarker>::Owned, ) -> <StorageVariant as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.