pub trait Once: Kind0L1T {
type Output<A>;
// Required methods
fn new<A>() -> ApplyOnce<Self, A>;
fn get<A>(a: &ApplyOnce<Self, A>) -> Option<&A>;
fn get_mut<A>(a: &mut ApplyOnce<Self, A>) -> Option<&mut A>;
fn set<A>(a: &ApplyOnce<Self, A>, value: A) -> Result<(), A>;
fn get_or_init<A, B: FnOnce() -> A>(a: &ApplyOnce<Self, A>, f: B) -> &A;
fn into_inner<A>(a: ApplyOnce<Self, A>) -> Option<A>;
fn take<A>(a: &mut ApplyOnce<Self, A>) -> Option<A>;
}๐Deprecated since 0.0.21: Use fp_library::v2::classes instead
Required Associated Typesยง
Required Methodsยง
fn new<A>() -> ApplyOnce<Self, A>
๐Deprecated since 0.0.21: Use fp_library::v2::classes instead
fn get<A>(a: &ApplyOnce<Self, A>) -> Option<&A>
๐Deprecated since 0.0.21: Use fp_library::v2::classes instead
fn get_mut<A>(a: &mut ApplyOnce<Self, A>) -> Option<&mut A>
๐Deprecated since 0.0.21: Use fp_library::v2::classes instead
fn set<A>(a: &ApplyOnce<Self, A>, value: A) -> Result<(), A>
๐Deprecated since 0.0.21: Use fp_library::v2::classes instead
fn get_or_init<A, B: FnOnce() -> A>(a: &ApplyOnce<Self, A>, f: B) -> &A
๐Deprecated since 0.0.21: Use fp_library::v2::classes instead
fn into_inner<A>(a: ApplyOnce<Self, A>) -> Option<A>
๐Deprecated since 0.0.21: Use fp_library::v2::classes instead
fn take<A>(a: &mut ApplyOnce<Self, A>) -> Option<A>
๐Deprecated since 0.0.21: Use fp_library::v2::classes instead
Dyn Compatibilityยง
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.