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 table contains one ImageContent for
each image whose file the publish stage read, keyed by the address of the
image’s node. Under the other strategies, the table is empty.
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.
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 GraphicsContent
impl Move for GraphicsContent
impl RefUnwindSafe for GraphicsContent
impl Send for GraphicsContent
impl Sync for GraphicsContent
impl Unpin for GraphicsContent
impl UnsafeUnpin for GraphicsContent
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