Struct build_data::OnceI64 [−][src]
pub struct OnceI64 { /* fields omitted */ }Caches an i64.
Implementations
impl OnceI64[src]
#[must_use]pub const fn new() -> Self[src]
#[must_use]
pub const fn new() -> SelfMakes a new empty struct.
pub fn get(
&self,
f: impl FnOnce() -> Result<i64, String>
) -> Result<i64, String>[src]
&self,
f: impl FnOnce() -> Result<i64, String>
) -> Result<i64, String>
Gets the value if it was already created, otherwise calls f to create it.
Thread-safe.
Errors
Returns any error returned by f.
Auto Trait Implementations
impl RefUnwindSafe for OnceI64
impl Send for OnceI64
impl Sync for OnceI64
impl Unpin for OnceI64
impl UnwindSafe for OnceI64
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,