pub enum NotebookCell<T> {
RichText {
id: Uuid,
content: String,
},
Formal {
id: Uuid,
content: T,
},
Stem {
id: Uuid,
},
}
Variants§
Trait Implementations§
Source§impl<T: Debug> Debug for NotebookCell<T>
impl<T: Debug> Debug for NotebookCell<T>
Source§impl<'de, T> Deserialize<'de> for NotebookCell<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for NotebookCell<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> From<NotebookCell<T>> for JsValuewhere
NotebookCell<T>: Serialize,
impl<T> From<NotebookCell<T>> for JsValuewhere
NotebookCell<T>: Serialize,
Source§fn from(value: NotebookCell<T>) -> Self
fn from(value: NotebookCell<T>) -> Self
Converts to this type from the input type.
Source§impl<T> FromWasmAbi for NotebookCell<T>where
Self: DeserializeOwned,
impl<T> FromWasmAbi for NotebookCell<T>where
Self: DeserializeOwned,
Source§impl<T> IntoWasmAbi for NotebookCell<T>where
NotebookCell<T>: Serialize,
impl<T> IntoWasmAbi for NotebookCell<T>where
NotebookCell<T>: Serialize,
Source§impl<T> OptionFromWasmAbi for NotebookCell<T>where
Self: DeserializeOwned,
impl<T> OptionFromWasmAbi for NotebookCell<T>where
Self: DeserializeOwned,
Source§impl<T> OptionIntoWasmAbi for NotebookCell<T>where
NotebookCell<T>: Serialize,
impl<T> OptionIntoWasmAbi for NotebookCell<T>where
NotebookCell<T>: Serialize,
Source§impl<T: PartialEq> PartialEq for NotebookCell<T>
impl<T: PartialEq> PartialEq for NotebookCell<T>
Source§impl<T> RefFromWasmAbi for NotebookCell<T>where
Self: DeserializeOwned,
impl<T> RefFromWasmAbi for NotebookCell<T>where
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
The Wasm ABI type references to
Self
are recovered from.Source§type Anchor = SelfOwner<NotebookCell<T>>
type Anchor = SelfOwner<NotebookCell<T>>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl<T> Serialize for NotebookCell<T>where
T: Serialize,
impl<T> Serialize for NotebookCell<T>where
T: Serialize,
Source§impl<T> Tsify for NotebookCell<T>
impl<T> Tsify for NotebookCell<T>
const DECL: &'static str = "export type NotebookCell<T> = { tag: \"rich-text\"; id: Uuid; content: string } | { tag: \"formal\"; id: Uuid; content: T } | { tag: \"stem\"; id: Uuid };"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Source§impl<T> VectorFromWasmAbi for NotebookCell<T>where
Self: DeserializeOwned,
impl<T> VectorFromWasmAbi for NotebookCell<T>where
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl<T> VectorIntoWasmAbi for NotebookCell<T>where
NotebookCell<T>: Serialize,
impl<T> VectorIntoWasmAbi for NotebookCell<T>where
NotebookCell<T>: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl<T> WasmDescribeVector for NotebookCell<T>
impl<T> WasmDescribeVector for NotebookCell<T>
impl<T: Eq> Eq for NotebookCell<T>
impl<T> StructuralPartialEq for NotebookCell<T>
Auto Trait Implementations§
impl<T> Freeze for NotebookCell<T>where
T: Freeze,
impl<T> RefUnwindSafe for NotebookCell<T>where
T: RefUnwindSafe,
impl<T> Send for NotebookCell<T>where
T: Send,
impl<T> Sync for NotebookCell<T>where
T: Sync,
impl<T> Unpin for NotebookCell<T>where
T: Unpin,
impl<T> UnwindSafe for NotebookCell<T>where
T: UnwindSafe,
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
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.