pub struct Lazy<T> { /* private fields */ }
👎Deprecated since 2.16: Please regenerate .rs files from .proto files to use newer APIs
Expand description
Lasily initialized data.
Implementations§
source§impl<T> Lazy<T>
impl<T> Lazy<T>
sourcepub const INIT: Lazy<T> = _
pub const INIT: Lazy<T> = _
Uninitialized Lazy
object.
The initializer is added in rust-protobuf 2.11, for compatibility with previously generated code, existing fields are kept public.
sourcepub fn get<F>(&'static mut self, init: F) -> &'static Twhere
F: FnOnce() -> T,
pub fn get<F>(&'static mut self, init: F) -> &'static Twhere F: FnOnce() -> T,
Get lazy field value, initialize it with given function if not yet.
Auto Trait Implementations§
impl<T> RefUnwindSafe for Lazy<T>where T: RefUnwindSafe,
impl<T> !Send for Lazy<T>
impl<T> !Sync for Lazy<T>
impl<T> Unpin for Lazy<T>
impl<T> UnwindSafe for Lazy<T>where T: RefUnwindSafe,
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