pub struct DeckSession { /* private fields */ }Implementations§
Source§impl DeckSession
impl DeckSession
pub fn snapshot(&self) -> EditResult<DeckSnapshot>
pub fn insert_slide( &self, context: &EditCtx, index: u32, layout_part_path: Option<&str>, ) -> EditResult<SlideReceipt>
pub fn delete_slide( &self, context: &EditCtx, slide_id: &str, ) -> EditResult<SlideReceipt>
pub fn move_slide( &self, context: &EditCtx, slide_id: &str, to_index: u32, ) -> EditResult<SlideReceipt>
pub fn add_text_box( &self, context: &EditCtx, slide_id: &str, draft: &ShapeDraft, ) -> EditResult<ShapeReceipt>
pub fn add_shape( &self, context: &EditCtx, slide_id: &str, draft: &PresetShapeDraft, ) -> EditResult<ShapeReceipt>
pub fn set_shape_fill( &self, context: &EditCtx, slide_id: &str, shape_id: &str, color: Option<&str>, ) -> EditResult<ShapeFillReceipt>
pub fn set_shape_stroke( &self, context: &EditCtx, slide_id: &str, shape_id: &str, stroke: &ShapeStroke, ) -> EditResult<ShapeStrokeReceipt>
pub fn set_shape_adjust( &self, context: &EditCtx, slide_id: &str, shape_id: &str, adjustments: &BTreeMap<String, f64>, ) -> EditResult<ShapeAdjustReceipt>
pub fn remove_shape( &self, context: &EditCtx, slide_id: &str, shape_id: &str, ) -> EditResult<ShapeReceipt>
pub fn move_shape( &self, context: &EditCtx, slide_id: &str, shape_id: &str, x: i64, y: i64, ) -> EditResult<TransformReceipt>
pub fn resize_shape( &self, context: &EditCtx, slide_id: &str, shape_id: &str, width: i64, height: i64, ) -> EditResult<TransformReceipt>
Source§impl DeckSession
impl DeckSession
pub fn story(&self, story_id: &str) -> EditResult<StorySnapshot>
pub fn insert_text( &self, context: &EditCtx, story_id: &str, index: u32, text: &str, style: &TextStyle, ) -> EditResult<TextReceipt>
pub fn delete_text( &self, context: &EditCtx, story_id: &str, start: u32, end: u32, ) -> EditResult<TextReceipt>
pub fn format_text( &self, context: &EditCtx, story_id: &str, start: u32, end: u32, patch: &TextStylePatch, ) -> EditResult<TextReceipt>
pub fn insert_paragraph_break( &self, context: &EditCtx, story_id: &str, index: u32, ) -> EditResult<TextReceipt>
Source§impl DeckSession
impl DeckSession
pub fn open(bytes: &[u8], client_id: u64) -> EditResult<Self>
Sourcepub fn from_package(package: PptxPackage, client_id: u64) -> EditResult<Self>
pub fn from_package(package: PptxPackage, client_id: u64) -> EditResult<Self>
Opens an edit session from an already parsed package.
pub fn open_from_update(update: &[u8], client_id: u64) -> EditResult<Self>
pub fn client_id(&self) -> u64
pub fn package(&self) -> &PptxPackage
pub fn yrs_doc(&self) -> &Doc
pub fn encode_state_vector_v1(&self) -> Vec<u8> ⓘ
pub fn encode_state_as_update_v1(&self) -> Vec<u8> ⓘ
pub fn encode_diff_v1(&self, remote_state_vector: &[u8]) -> EditResult<Vec<u8>>
pub fn apply_update_v1(&self, bytes: &[u8]) -> EditResult<DeckSnapshot>
pub fn observe_update_v1<F>(&self, callback: F) -> EditResult<Subscription>where
F: Fn(UpdateEvent) + 'static,
pub fn undo(&self) -> bool
pub fn redo(&self) -> bool
pub fn can_undo(&self) -> bool
pub fn can_redo(&self) -> bool
pub fn add_undo_barrier(&self)
Auto Trait Implementations§
impl !Freeze for DeckSession
impl !RefUnwindSafe for DeckSession
impl !Send for DeckSession
impl !Sync for DeckSession
impl !UnwindSafe for DeckSession
impl Unpin for DeckSession
impl UnsafeUnpin for DeckSession
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