Struct fidl_fuchsia_ui_gfx::SetTagCmd
source · #[repr(C)]pub struct SetTagCmd {
pub node_id: u32,
pub tag_value: u32,
}
Expand description
Sets/clears a node’s tag value.
A session can apply a tag value to any node to which it has access, including imported nodes. These tags are private to the session and cannot be read or modified by other sessions. When multiple sessions import the same node, each session will only observe its own tag values.
Hit test results for a session only include nodes which the session has tagged with a non-zero value. Therefore a session can use tag values to associate nodes with their functional purpose when picked.
Constraints:
node_id
refs aNode
.tag_value
is the tag value to assign, or 0 to remove the tag.
Fields§
§node_id: u32
§tag_value: u32
Trait Implementations§
source§impl AsBytes for SetTagCmdwhere
u32: AsBytes,
HasPadding<SetTagCmd, { _ }>: ShouldBe<{ _ }>,
impl AsBytes for SetTagCmdwhere u32: AsBytes, HasPadding<SetTagCmd, { _ }>: ShouldBe<{ _ }>,
§fn as_bytes_mut(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
fn as_bytes_mut(&mut self) -> &mut [u8] ⓘwhere Self: FromBytes,
Gets the bytes of this value mutably. Read more
§fn write_to_prefix<B>(&self, bytes: B) -> Option<()>where
B: ByteSliceMut,
fn write_to_prefix<B>(&self, bytes: B) -> Option<()>where B: ByteSliceMut,
§fn write_to_suffix<B>(&self, bytes: B) -> Option<()>where
B: ByteSliceMut,
fn write_to_suffix<B>(&self, bytes: B) -> Option<()>where B: ByteSliceMut,
source§impl Decode<SetTagCmd> for SetTagCmd
impl Decode<SetTagCmd> for SetTagCmd
source§impl FromBytes for SetTagCmdwhere
u32: FromBytes,
impl FromBytes for SetTagCmdwhere u32: FromBytes,
§fn read_from_prefix<B>(bytes: B) -> Option<Self>where
B: ByteSlice,
Self: Sized,
fn read_from_prefix<B>(bytes: B) -> Option<Self>where B: ByteSlice, Self: Sized,
§fn read_from_suffix<B>(bytes: B) -> Option<Self>where
B: ByteSlice,
Self: Sized,
fn read_from_suffix<B>(bytes: B) -> Option<Self>where B: ByteSlice, Self: Sized,
§fn new_zeroed() -> Selfwhere
Self: Sized,
fn new_zeroed() -> Selfwhere Self: Sized,
Creates an instance of
Self
from zeroed bytes.source§impl Ord for SetTagCmd
impl Ord for SetTagCmd
source§impl PartialEq<SetTagCmd> for SetTagCmd
impl PartialEq<SetTagCmd> for SetTagCmd
source§impl PartialOrd<SetTagCmd> for SetTagCmd
impl PartialOrd<SetTagCmd> for SetTagCmd
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 SetTagCmd
impl TypeMarker for SetTagCmd
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.