Skip to main content

component_type

Function component_type 

Source
pub fn component_type<'buf>(
    address: &Address,
    buffer: &'buf mut [u8],
) -> Result<&'buf mut str>
Expand description

Returns the type of a component.

The address parameter identifies the component by its UUID. The buffer parameter identifies where to store the component type.

The type is written into buffer and a string slice referring to it is returned.

ยงErrors

  • BufferTooShort is returned if buffer is provided but is not large enough to hold the component type.
  • NoSuchComponent is returned if the component does not exist or is inaccessible.