pub struct GraphicsConfig {
pub global: bool,
}Expand description
The configuration of the graphics feature, which selects where
\includegraphics can be written.
By default (global is false), \includegraphics is available only in
the bodies whose declarations refer to the scoped package
flm.graphics.includegraphics, for instance the
body of a figure when the floats feature is registered. When global
is true, \includegraphics is also an ordinary command, which can be
written wherever text can be written.
The configuration is the value from which the feature is constructed. It
is fixed when the registry is built, and cannot vary per document or per
render (settings, options and
configuration).
The configuration changes which commands exist in the language, so
digest_bytes is an input of the registry
digest. To configure the feature among the standard features, use
StdlibConfig::graphics.
§Examples
use flm_core::stdlib::features::graphics::GraphicsConfig;
assert!(!GraphicsConfig::new().global);
assert!(GraphicsConfig::new().global(true).global);Fields§
§global: boolWhether \includegraphics can be written wherever text can be written.
When false (the default), the command is available only in the
bodies that refer to its scoped package
flm.graphics.includegraphics, such as the
bodies of the float types figure and table.
Implementations§
Source§impl GraphicsConfig
impl GraphicsConfig
Sourcepub fn new() -> GraphicsConfig
pub fn new() -> GraphicsConfig
Returns the default configuration, in which global is false.
Sourcepub fn global(self, global: bool) -> GraphicsConfig
pub fn global(self, global: bool) -> GraphicsConfig
Sets global and returns the configuration.
Sourcepub fn digest_bytes(&self) -> Vec<u8> ⓘ
pub fn digest_bytes(&self) -> Vec<u8> ⓘ
Returns the bytes that represent this configuration in the registry
digest: one byte, 1 when global is true and 0 otherwise.
Trait Implementations§
Source§impl Clone for GraphicsConfig
impl Clone for GraphicsConfig
impl Copy for GraphicsConfig
Source§impl Debug for GraphicsConfig
impl Debug for GraphicsConfig
Source§impl Default for GraphicsConfig
impl Default for GraphicsConfig
Source§impl<'de> Deserialize<'de> for GraphicsConfigwhere
GraphicsConfig: Default,
impl<'de> Deserialize<'de> for GraphicsConfigwhere
GraphicsConfig: 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 GraphicsConfig
Source§impl Hash for GraphicsConfig
impl Hash for GraphicsConfig
Source§impl JsonSchema for GraphicsConfig
impl JsonSchema for GraphicsConfig
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 GraphicsConfig
impl PartialEq for GraphicsConfig
impl StructuralPartialEq for GraphicsConfig
Auto Trait Implementations§
impl Forget for GraphicsConfig
impl Freeze for GraphicsConfig
impl Move for GraphicsConfig
impl RefUnwindSafe for GraphicsConfig
impl Send for GraphicsConfig
impl Sync for GraphicsConfig
impl Unpin for GraphicsConfig
impl UnsafeUnpin for GraphicsConfig
impl UnwindSafe for GraphicsConfig
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