pub struct FeatureSettings { /* private fields */ }Expand description
A feature’s settings as read from data by SettingsDecl::read: its
configuration, and the option values to set on a document and on a render
request.
A host passes the configuration to the feature’s package through
PackageSettings, sets the document option values on the document and the
render option values on the plan request.
Implementations§
Source§impl FeatureSettings
impl FeatureSettings
Sourcepub fn feature(&self) -> &FeatureName
pub fn feature(&self) -> &FeatureName
The name of the feature whose settings these are.
Sourcepub fn config<C: Any>(&self) -> Option<&C>
pub fn config<C: Any>(&self) -> Option<&C>
The feature’s configuration, or None when the feature declares no
configuration of type C. The configuration is the type’s default when
none of its keys was written.
Sourcepub fn document_options(&self) -> &OptionValues
pub fn document_options(&self) -> &OptionValues
The option values a host sets on the document
(Doc::with_options): those of
every option type bound to the document (Bind::Document) or to either
site (Bind::Either) at least one of whose keys was written.
Sourcepub fn render_options(&self) -> &OptionValues
pub fn render_options(&self) -> &OptionValues
The option values a host sets on the render request
(PlanRequest::render_options):
those of every option type bound to the render request
(Bind::Render) at least one of whose keys was written.
Trait Implementations§
Source§impl Clone for FeatureSettings
impl Clone for FeatureSettings
Auto Trait Implementations§
impl !RefUnwindSafe for FeatureSettings
impl !UnwindSafe for FeatureSettings
impl Forget for FeatureSettings
impl Freeze for FeatureSettingswhere
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const ArcInner<dyn Any + Send + Sync> is !null: Freeze,
PhantomData<ArcInner<dyn Any + Send + Sync>>: Freeze,
*const LeafNode<OptionKey, OptionValue> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(OptionKey, OptionValue)>>: Freeze,
impl Move for FeatureSettings
impl Send for FeatureSettings
impl Sync for FeatureSettings
impl Unpin for FeatureSettings
impl UnsafeUnpin for FeatureSettingswhere
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const ArcInner<dyn Any + Send + Sync> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Any + Send + Sync>>: UnsafeUnpin,
*const LeafNode<OptionKey, OptionValue> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(OptionKey, OptionValue)>>: UnsafeUnpin,
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,
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