Enum ImportSpec
#[repr(u32)]pub enum ImportSpec {
Node = 0,
}
Expand description
Describes an exported resource that is to be imported by an ImportResourceCmd.
NOTE: Currently just an enum of importable resource types, but may later be expanded to express concepts like “meshes with a particular vertex format”.
Variants§
Node = 0
Implementations§
§impl ImportSpec
impl ImportSpec
pub fn from_primitive(prim: u32) -> Option<ImportSpec>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
§impl Clone for ImportSpec
impl Clone for ImportSpec
§fn clone(&self) -> ImportSpec
fn clone(&self) -> ImportSpec
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 more§impl Debug for ImportSpec
impl Debug for ImportSpec
§impl<D> Decode<ImportSpec, D> for ImportSpecwhere
D: ResourceDialect,
impl<D> Decode<ImportSpec, D> for ImportSpecwhere
D: ResourceDialect,
§fn new_empty() -> ImportSpec
fn new_empty() -> ImportSpec
Creates a valid instance of
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<ImportSpec, D> for ImportSpecwhere
D: ResourceDialect,
impl<D> Encode<ImportSpec, D> for ImportSpecwhere
D: ResourceDialect,
§impl Hash for ImportSpec
impl Hash for ImportSpec
§impl Ord for ImportSpec
impl Ord for ImportSpec
§impl PartialEq for ImportSpec
impl PartialEq for ImportSpec
§impl PartialOrd for ImportSpec
impl PartialOrd for ImportSpec
§impl TypeMarker for ImportSpec
impl TypeMarker for ImportSpec
§type Owned = ImportSpec
type Owned = ImportSpec
The owned Rust type which this FIDL type decodes into.
§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.
§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
.§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 more§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.§impl ValueTypeMarker for ImportSpec
impl ValueTypeMarker for ImportSpec
§type Borrowed<'a> = ImportSpec
type Borrowed<'a> = ImportSpec
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§fn borrow(
value: &<ImportSpec as TypeMarker>::Owned,
) -> <ImportSpec as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<ImportSpec as TypeMarker>::Owned, ) -> <ImportSpec as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned
to Self::Borrowed
.impl Copy for ImportSpec
impl Eq for ImportSpec
impl StructuralPartialEq for ImportSpec
Auto Trait Implementations§
impl Freeze for ImportSpec
impl RefUnwindSafe for ImportSpec
impl Send for ImportSpec
impl Sync for ImportSpec
impl Unpin for ImportSpec
impl UnwindSafe for ImportSpec
Blanket Implementations§
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
Mutably borrows from an owned value. Read more