pub struct ImportResourceCmdDeprecated {
pub id: u32,
pub token: EventPair,
pub spec: ImportSpec,
}
Expand description
Import a resource that was exported via ExportResourceCmd(). token
is
a handle to the eventpair peer that was used to export the resource, and
spec
describes the type of the imported resource, and the commands which
can legally be applied to it. Afterward, id
can be used to refer to the
resource in an Command, similarly (but not identically: see below) to a
resource that was created in the session. For example, you can add children
to an imported EntityNode via AddChildCmd.
However, note that the importer does not gain full access to the imported resource, but rather to an attenuated subset of its capabilities. For example, you cannot use a DetachCmd to detach an imported EntityNode from its parent.
Unlike ExportResourceCmd, there is no configurable timeout. There is an expectation that the exported resource will become available in a short amount of time. TODO: this needs elaboration… e.g. we might notify via the SessionListener when we know that the link will never be made (e.g. if the peer of the import token is destroyed).
Fields§
§id: u32
§token: EventPair
§spec: ImportSpec
Trait Implementations§
Source§impl Debug for ImportResourceCmdDeprecated
impl Debug for ImportResourceCmdDeprecated
Source§impl Decode<ImportResourceCmdDeprecated, DefaultFuchsiaResourceDialect> for ImportResourceCmdDeprecated
impl Decode<ImportResourceCmdDeprecated, DefaultFuchsiaResourceDialect> for ImportResourceCmdDeprecated
Source§impl Encode<ImportResourceCmdDeprecated, DefaultFuchsiaResourceDialect> for &mut ImportResourceCmdDeprecated
impl Encode<ImportResourceCmdDeprecated, DefaultFuchsiaResourceDialect> for &mut ImportResourceCmdDeprecated
Source§impl<T0: Encode<u32, DefaultFuchsiaResourceDialect>, T1: Encode<HandleType<EventPair, { _ }, 2147483648>, DefaultFuchsiaResourceDialect>, T2: Encode<ImportSpec, DefaultFuchsiaResourceDialect>> Encode<ImportResourceCmdDeprecated, DefaultFuchsiaResourceDialect> for (T0, T1, T2)
impl<T0: Encode<u32, DefaultFuchsiaResourceDialect>, T1: Encode<HandleType<EventPair, { _ }, 2147483648>, DefaultFuchsiaResourceDialect>, T2: Encode<ImportSpec, DefaultFuchsiaResourceDialect>> Encode<ImportResourceCmdDeprecated, DefaultFuchsiaResourceDialect> for (T0, T1, T2)
Source§impl Hash for ImportResourceCmdDeprecated
impl Hash for ImportResourceCmdDeprecated
Source§impl Ord for ImportResourceCmdDeprecated
impl Ord for ImportResourceCmdDeprecated
Source§fn cmp(&self, other: &ImportResourceCmdDeprecated) -> Ordering
fn cmp(&self, other: &ImportResourceCmdDeprecated) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for ImportResourceCmdDeprecated
impl PartialOrd for ImportResourceCmdDeprecated
Source§impl ResourceTypeMarker for ImportResourceCmdDeprecated
impl ResourceTypeMarker for ImportResourceCmdDeprecated
Source§type Borrowed<'a> = &'a mut ImportResourceCmdDeprecated
type Borrowed<'a> = &'a mut ImportResourceCmdDeprecated
Encode<Self>
type cheaply obtainable from &mut Self::Owned
. There are three cases: Read moreSource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned,
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned, ) -> Self::Borrowed<'a>
&mut Self::Owned
to Self::Borrowed
. For
HandleBased
types this is “take” (it returns an owned handle and
replaces value
with Handle::invalid
), and for all other types it is
“borrow” (just converts from one reference to another).Source§impl TypeMarker for ImportResourceCmdDeprecated
impl TypeMarker for ImportResourceCmdDeprecated
Source§type Owned = ImportResourceCmdDeprecated
type Owned = ImportResourceCmdDeprecated
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.