pub struct Doc {
pub publisher: Arc<DocPublisher>,
/* private fields */
}
Fields§
§publisher: Arc<DocPublisher>
Implementations§
Source§impl Doc
impl Doc
pub fn with_options(options: DocOptions) -> Self
pub fn with_client(client_id: u64) -> Self
pub fn client(&self) -> Client
pub fn guid(&self) -> &str
pub fn new_from_binary(binary: Vec<u8>) -> JwstCodecResult<Self>
pub fn new_from_binary_with_options( binary: Vec<u8>, options: DocOptions, ) -> JwstCodecResult<Self>
pub fn apply_update_from_binary(&mut self, update: Vec<u8>) -> JwstCodecResult
pub fn apply_update(&mut self, update: Update) -> JwstCodecResult
pub fn keys(&self) -> Vec<String>
pub fn get_or_create_text(&self, name: &str) -> JwstCodecResult<Text>
pub fn create_text(&self) -> JwstCodecResult<Text>
pub fn get_or_create_array(&self, str: &str) -> JwstCodecResult<Array>
pub fn create_array(&self) -> JwstCodecResult<Array>
pub fn get_or_create_map(&self, str: &str) -> JwstCodecResult<Map>
pub fn create_map(&self) -> JwstCodecResult<Map>
pub fn get_map(&self, str: &str) -> JwstCodecResult<Map>
pub fn encode_update_v1(&self) -> JwstCodecResult<Vec<u8>>
pub fn encode_state_as_update_v1( &self, sv: &StateVector, ) -> JwstCodecResult<Vec<u8>>
pub fn get_state_vector(&self) -> StateVector
pub fn subscribe(&self, cb: impl Fn(&[u8]) + Sync + Send + 'static)
pub fn unsubscribe_all(&self)
Trait Implementations§
impl Send for Doc
impl Sync for Doc
Auto Trait Implementations§
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