pub struct CellsConfig {
pub global: bool,
}Expand description
The configuration of the cells feature: whether the cells environment
is also an ordinary environment of the document.
Under the default, global: false, the environment can be written only
inside the bodies whose declarations refer to the scoped package
ENVIRONMENT_PACKAGE: a table float’s, where the floats feature is
registered. Under global: true it is also an ordinary environment,
written wherever blocks can be: between paragraphs, in a list item, in a
footnote.
The value is the feature’s configuration (see
configuration):
fixed when the registry is built, since it decides which environments the
registry’s parsing language (BuiltLang)
holds, and fed into the registry digest
(digest_bytes). The standard features
carry it as StdlibConfig::cells.
§Examples
use flm_core::stdlib::features::cells::CellsConfig;
assert!(!CellsConfig::new().global);
assert!(CellsConfig::new().global(true).global);Fields§
§global: boolWhether the cells environment is an ordinary environment of the
document, in addition to its declaration in the scoped package
ENVIRONMENT_PACKAGE. false by default.
Implementations§
Source§impl CellsConfig
impl CellsConfig
Sourcepub fn new() -> CellsConfig
pub fn new() -> CellsConfig
The default configuration: the environment is declared in its scoped package only.
Sourcepub fn global(self, global: bool) -> CellsConfig
pub fn global(self, global: bool) -> CellsConfig
Builder: sets global.
Sourcepub fn digest_bytes(&self) -> Vec<u8> ⓘ
pub fn digest_bytes(&self) -> Vec<u8> ⓘ
The bytes the feature feeds into the registry digest: one byte, 1
under global and 0 otherwise.
Trait Implementations§
Source§impl Clone for CellsConfig
impl Clone for CellsConfig
impl Copy for CellsConfig
Source§impl Debug for CellsConfig
impl Debug for CellsConfig
Source§impl Default for CellsConfig
impl Default for CellsConfig
Source§impl<'de> Deserialize<'de> for CellsConfigwhere
CellsConfig: Default,
impl<'de> Deserialize<'de> for CellsConfigwhere
CellsConfig: Default,
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>,
impl Eq for CellsConfig
Source§impl Hash for CellsConfig
impl Hash for CellsConfig
Source§impl JsonSchema for CellsConfig
impl JsonSchema for CellsConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for CellsConfig
impl PartialEq for CellsConfig
impl StructuralPartialEq for CellsConfig
Auto Trait Implementations§
impl Forget for CellsConfig
impl Freeze for CellsConfig
impl Move for CellsConfig
impl RefUnwindSafe for CellsConfig
impl Send for CellsConfig
impl Sync for CellsConfig
impl Unpin for CellsConfig
impl UnsafeUnpin for CellsConfig
impl UnwindSafe for CellsConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more