Struct shortcut_autotyper::Content
source · pub struct Content(/* private fields */);
Expand description
Represents a sequence of ContentItem
s.
Implementations§
source§impl Content
impl Content
sourcepub fn generate_content(&self, args: &Vec<String>) -> String
pub fn generate_content(&self, args: &Vec<String>) -> String
Generates the content for this Content
object based
on the provided arguments.
It processes each ContentItem
in the sequence and generates
the final content by replacing variable placeholders with their
corresponding values from args
.
§Examples
use shortcut_autotyper::Content;
let vec = vec![String::from("shortcut-autotyper"), String::from("X")];
let content = Content::from("A <1> B");
assert_eq!(&content.generate_content(&vec), "A X B");
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Content
impl Send for Content
impl Sync for Content
impl Unpin for Content
impl UnwindSafe for Content
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