struct Layers(RefCell<Vec<Rc<RefCell<LayerData>>>>);Tuple Fields§
§0: RefCell<Vec<Rc<RefCell<LayerData>>>>Implementations§
Source§impl Layers
impl Layers
Sourcepub fn new(layer_id: LayerInternalId) -> Self
pub fn new(layer_id: LayerInternalId) -> Self
Creates a new collection of layers, initializing it with the provided first layer.
Sourcepub fn get(&self, idx: usize) -> Option<Rc<RefCell<LayerData>>>
pub fn get(&self, idx: usize) -> Option<Rc<RefCell<LayerData>>>
Returns the layer at the given index, if present.
Sourcepub fn push_with_obj(&self, layer_obj: Layer) -> Rc<RefCell<LayerData>>
pub fn push_with_obj(&self, layer_obj: Layer) -> Rc<RefCell<LayerData>>
Adds a layer to the collection by providing a printpdf::Layer object and
returns its Rc.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Layers
impl !RefUnwindSafe for Layers
impl !Send for Layers
impl !Sync for Layers
impl Unpin for Layers
impl !UnwindSafe for Layers
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.