Struct genet_sdk::layer::Layer [−][src]
#[repr(C)]pub struct Layer { /* fields omitted */ }
A layer object.
Methods
impl Layer
[src]
impl Layer
pub fn new<C, B>(class: C, data: B) -> Layer where
B: Into<ByteSlice>,
C: Into<Fixed<LayerClass>>,
[src]
pub fn new<C, B>(class: C, data: B) -> Layer where
B: Into<ByteSlice>,
C: Into<Fixed<LayerClass>>,
Creates a new Layer.
pub fn id(&self) -> Token
[src]
pub fn id(&self) -> Token
Returns the ID of self.
pub fn data(&self) -> ByteSlice
[src]
pub fn data(&self) -> ByteSlice
Returns the type of self.
pub fn headers(&self) -> &[Fixed<Attr>]
[src]
pub fn headers(&self) -> &[Fixed<Attr>]
Returns the slice of headers.
pub fn attrs(&self) -> &[Fixed<Attr>]
[src]
pub fn attrs(&self) -> &[Fixed<Attr>]
Returns the slice of attributes.
pub fn attr<T>(&self, id: T) -> Option<&Attr> where
T: Into<Token>,
[src]
pub fn attr<T>(&self, id: T) -> Option<&Attr> where
T: Into<Token>,
Find the attribute in the Layer.
pub fn add_attr<T>(&mut self, attr: T) where
T: Into<Fixed<Attr>>,
[src]
pub fn add_attr<T>(&mut self, attr: T) where
T: Into<Fixed<Attr>>,
Adds an attribute to the Layer.
pub fn payloads(&self) -> &[Payload]
[src]
pub fn payloads(&self) -> &[Payload]
Returns the slice of payloads.
pub fn add_payload(&mut self, payload: Payload)
[src]
pub fn add_payload(&mut self, payload: Payload)
Adds a payload to the Layer.