pub struct GraphicsContent { /* private fields */ }Expand description
The value of the content table of a backend,
flm.graphics.content.<backend> (content_table).
Under the strategy content, the standard publish stage writes one
ImageContent into the table for each image whose file it read, keyed by
the address of the image’s node. Under the other strategies, the table is
empty. A stage that the plan prefers in place of the standard one decides
what the table contains (see a publish stage of your
own).
Implementations§
Source§impl GraphicsContent
impl GraphicsContent
Sourcepub fn get(&self, addr: NodeAddr) -> Option<&ImageContent>
pub fn get(&self, addr: NodeAddr) -> Option<&ImageContent>
Returns the content of the image at the node address addr, or None
if the table contains no entry for this address.
Sourcepub fn iter(&self) -> impl Iterator<Item = (NodeAddr, &ImageContent)> + '_
pub fn iter(&self) -> impl Iterator<Item = (NodeAddr, &ImageContent)> + '_
Returns the content of every image with its node address, in the order of the node addresses.
Sourcepub fn insert(&mut self, addr: NodeAddr, image: ImageContent)
pub fn insert(&mut self, addr: NodeAddr, image: ImageContent)
Records image as the content of the image of the node at the address
addr. An entry already recorded for addr is replaced, as
Table::absorb replaces it between the pieces of the table.
Trait Implementations§
Source§impl Clone for GraphicsContent
impl Clone for GraphicsContent
Source§impl Debug for GraphicsContent
impl Debug for GraphicsContent
Source§impl Default for GraphicsContent
impl Default for GraphicsContent
impl Eq for GraphicsContent
Source§impl PartialEq for GraphicsContent
impl PartialEq for GraphicsContent
impl StructuralPartialEq for GraphicsContent
Source§impl Table for GraphicsContent
impl Table for GraphicsContent
Source§fn project(&self, cx: &dyn ProjectCx) -> SerialValue
fn project(&self, cx: &dyn ProjectCx) -> SerialValue
Returns the list of entries, in the order of their node addresses. Each
entry is a map with the keys node, src, media_type and content.
The value of content is { text } if the bytes are valid UTF-8 text,
and { base64 } otherwise, with the bytes encoded in base64 (standard
alphabet, with padding). An extension receives the content of an
artifact in the same form.
Source§fn absorb(&mut self, piece: GraphicsContent)
fn absorb(&mut self, piece: GraphicsContent)
Source§fn piece_class(&self) -> PieceClass
fn piece_class(&self) -> PieceClass
Auto Trait Implementations§
impl Forget for GraphicsContent
impl Freeze for GraphicsContentwhere
*const LeafNode<NodeAddr, ImageContent> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(NodeAddr, ImageContent)>>: Freeze,
impl Move for GraphicsContent
impl RefUnwindSafe for GraphicsContent
impl Send for GraphicsContentwhere
NodeRef<Owned, NodeAddr, ImageContent, LeafOrInternal>: Send,
BoxRaw<(NodeAddr, ImageContent)>: Send,
impl Sync for GraphicsContentwhere
NodeRef<Owned, NodeAddr, ImageContent, LeafOrInternal>: Sync,
BoxRaw<(NodeAddr, ImageContent)>: Sync,
impl Unpin for GraphicsContentwhere
*const LeafNode<NodeAddr, ImageContent> is !null: Unpin,
Box<(NodeAddr, ImageContent)>: Unpin,
impl UnsafeUnpin for GraphicsContentwhere
*const LeafNode<NodeAddr, ImageContent> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(NodeAddr, ImageContent)>>: UnsafeUnpin,
impl UnwindSafe for GraphicsContent
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<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