Trait sdml_core::model::HasBody

source ·
pub trait HasBody<T> {
    // Required methods
    fn body(&self) -> &T;
    fn body_mut(&mut self) -> &mut T;
    fn set_body(&mut self, body: T);
}
Expand description

This trait is implemented by types that have a distinct /body/ type.

Required Methods§

source

fn body(&self) -> &T

Get the body of the enclosing type.

source

fn body_mut(&mut self) -> &mut T

Get a mutable reference to the body of the enclosing type.

source

fn set_body(&mut self, body: T)

Set the body of the enclosing type.

Implementors§