Trait sp_runtime::traits::Lazy

source ·
pub trait Lazy<T: ?Sized> {
    // Required method
    fn get(&mut self) -> &T;
}
Expand description

A lazy value.

Required Methods§

source

fn get(&mut self) -> &T

Get a reference to the underlying value.

This will compute the value if the function is invoked for the first time.

Implementations on Foreign Types§

source§

impl<'a> Lazy<[u8]> for &'a [u8]

source§

fn get(&mut self) -> &[u8]

Implementors§