pub struct Layer { /* private fields */ }Expand description
A layer object.
Implementations§
Source§impl Layer
impl Layer
Sourcepub fn payloads(&self) -> Box<dyn Iterator<Item = &Payload>>
pub fn payloads(&self) -> Box<dyn Iterator<Item = &Payload>>
Returns an Iterator for the payloads of self.
Sourcepub fn add_layer(&mut self, ctx: &mut Context, id: Token) -> &mut Layer
pub fn add_layer(&mut self, ctx: &mut Context, id: Token) -> &mut Layer
Allocates a new Layer and add it as a child.
Sourcepub fn add_attr(&mut self, ctx: &mut Context, id: Token) -> &mut Attr
pub fn add_attr(&mut self, ctx: &mut Context, id: Token) -> &mut Attr
Allocates a new Attr and add it as a child.
Sourcepub fn add_attr_alias(&mut self, ctx: &mut Context, alias: Token, target: Token)
pub fn add_attr_alias(&mut self, ctx: &mut Context, alias: Token, target: Token)
Allocates a new alias Attr.
Sourcepub fn add_payload(&mut self, ctx: &mut Context) -> &mut Payload
pub fn add_payload(&mut self, ctx: &mut Context) -> &mut Payload
Allocates a new Payload and add it as a child.
Sourcepub fn add_error(&mut self, ctx: &mut Context, id: Token, msg: &str)
pub fn add_error(&mut self, ctx: &mut Context, id: Token, msg: &str)
Allocates a new error Attr.
Sourcepub fn parent_mut(&mut self) -> Option<&mut Layer>
pub fn parent_mut(&mut self) -> Option<&mut Layer>
Returns a mutable reference to the parent of self.
Sourcepub fn set_worker(&mut self, worker: u8)
pub fn set_worker(&mut self, worker: u8)
Sets the worker ID of self.
Trait Implementations§
Auto Trait Implementations§
impl !Send for Layer
impl !Sync for Layer
impl Freeze for Layer
impl RefUnwindSafe for Layer
impl Unpin for Layer
impl UnsafeUnpin for Layer
impl UnwindSafe for Layer
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