README

Lampese/lomo/state does not have a README file

#
AnchorType

pub(all) enum AnchorType {
Start
End
}

impl Eq for AnchorType
impl Show for AnchorType

#
ContainerState

pub enum ContainerState {
MapState(MapState)
ListState(ListState)
TextState(TextState)
MovableListState(MovableListState)
TreeState(TreeState)
CounterState(CounterState)
}

#
CounterState

pub struct CounterState {
value : Double
}

#
CounterState::apply

fn CounterState::apply(self : CounterState, delta : Double) -> Unit

#
CounterState::new

#
CounterState::to_value

#
CounterState::value

fn CounterState::value(self : CounterState) -> Double

#
DocState

pub struct DocState {
containers : Map[
ContainerID
, ContainerState]
}

impl Show for DocState

#
DocState::apply_op

#
DocState::apply_raw_op

#
DocState::container_items

#
DocState::counter_value

#
DocState::deep_value_for_container

#
DocState::get_deep_value

#
DocState::list_ids_in_range

#
DocState::movable_list_elem_id_at

#
DocState::movable_list_id_at

#
DocState::movable_list_ids_in_range

#
DocState::movable_list_len

#
DocState::movable_list_value_at

#
DocState::new

fn DocState::new() -> DocState

#
DocState::set_container_state

fn DocState::set_container_state(self : DocState, id :
ContainerID
, state : ContainerState) -> Unit

#
DocState::set_counter_state

fn DocState::set_counter_state(self : DocState, id :
ContainerID
, state : CounterState) -> Unit

#
DocState::set_list_state

fn DocState::set_list_state(self : DocState, id :
ContainerID
, state : ListState) -> Unit

#
DocState::set_map_state

fn DocState::set_map_state(self : DocState, id :
ContainerID
, state : MapState) -> Unit

#
DocState::set_movable_list_state

fn DocState::set_movable_list_state(self : DocState, id :
ContainerID
, state : MovableListState) -> Unit

#
DocState::set_text_state

fn DocState::set_text_state(self : DocState, id :
ContainerID
, state : TextState) -> Unit

#
DocState::set_tree_state

fn DocState::set_tree_state(self : DocState, id :
ContainerID
, state : TreeState) -> Unit

#
DocState::text_ids_in_range

#
DocState::text_list_pos_to_text_pos

fn DocState::text_list_pos_to_text_pos(self : DocState, id :
ContainerID
, list_pos : Int) -> Result[Int,
LoroError
]

#
DocState::text_plain_text

#
DocState::text_slice

fn DocState::text_slice(self : DocState, id :
ContainerID
, start : Int, end : Int) -> Result[String,
LoroError
]

#
DocState::text_text_index_to_list_pos

fn DocState::text_text_index_to_list_pos(self : DocState, id :
ContainerID
, text_pos : Int) -> Result[Int,
LoroError
]

#
DocState::text_text_pos_to_list_pos

fn DocState::text_text_pos_to_list_pos(self : DocState, id :
ContainerID
, text_pos : Int) -> Result[Int,
LoroError
]

#
DocState::text_unicode_index_from_utf16

fn DocState::text_unicode_index_from_utf16(self : DocState, id :
ContainerID
, offset : Int) -> Result[Int,
LoroError
]

#
DocState::text_unicode_index_from_utf8

fn DocState::text_unicode_index_from_utf8(self : DocState, id :
ContainerID
, offset : Int) -> Result[Int,
LoroError
]

#
Elem

impl Show for Elem

#
ListState

pub struct ListState {
list : Array[Elem]
}

impl Show for ListState

#
ListState::append_elem

#
ListState::delete_by_id

#
ListState::delete_range

fn ListState::delete_range(self : ListState, start : Int, end : Int) -> Result[Unit,
LoroError
]

#
ListState::elems

fn ListState::elems(self : ListState) -> Array[Elem]

#
ListState::id_at

#
ListState::ids_in_range

fn ListState::ids_in_range(self : ListState, start : Int, end : Int) -> Result[Array[
IdFull
],
LoroError
]

#
ListState::insert_batch

#
ListState::insert_batch_with_vv

#
ListState::len

fn ListState::len(self : ListState) -> Int

#
ListState::move_by_id

fn ListState::move_by_id(self : ListState, elem_id :
IdLp
, to : Int) -> Result[Unit,
LoroError
]

#
ListState::new

fn ListState::new() -> ListState

#
ListState::to_value

#
ListState::to_values

#
ListState::value_at

#
MapState

pub struct MapState {
entries : Map[String, MapValue]
child_containers : Map[
ContainerID
, String]
}

impl Show for MapState

#
MapState::delete

fn MapState::delete(self : MapState, key : String, id :
IdFull
) -> Unit

#
MapState::entry_items

fn MapState::entry_items(self : MapState) -> Array[(String, MapValue)]

#
MapState::get

fn MapState::get(self : MapState, key : String) ->
LoroValue
?

#
MapState::insert_entry

fn MapState::insert_entry(self : MapState, key : String, value : MapValue) -> Unit

#
MapState::new

fn MapState::new() -> MapState

#
MapState::set

#
MapState::to_value

#
MapState::update_entry

fn MapState::update_entry(self : MapState, key : String, next : MapValue) -> Unit

#
MapValue

pub struct MapValue {
value :
LoroValue
?
lamport : UInt
peer : UInt64
}

impl Show for MapValue

#
MapValue::new

fn MapValue::new(value :
LoroValue
?, lamport : UInt, peer : UInt64) -> MapValue

#
MovableElem

impl Show for MovableElem

#
MovableListState

pub struct MovableListState {
list : Array[MovableElem]
}

#
MovableListState::append_elem

#
MovableListState::append_elem_full

#
MovableListState::elem_id_at

#
MovableListState::elems

#
MovableListState::ids_in_range

#
MovableListState::len

fn MovableListState::len(self : MovableListState) -> Int

#
MovableListState::new

#
MovableListState::to_value

#
MovableListState::value_at

#
RichtextElem

pub(all) enum RichtextElem {
Text(TextElem)
Anchor(StyleOp, AnchorType)
}

#
StyleOp

pub(all) struct StyleOp {
id :
IdFull

key : String
value :
LoroValue

info : Int
}

impl Show for StyleOp

#
StyleSpan

pub struct StyleSpan {
start : Int
end : Int
key : String
value :
LoroValue

expand :
ExpandType

}

impl Show for StyleSpan

#
StyleSpan::end

fn StyleSpan::end(self : StyleSpan) -> Int

#
StyleSpan::key

fn StyleSpan::key(self : StyleSpan) -> String

#
StyleSpan::new

fn StyleSpan::new(start : Int, end : Int, key : String, value :
LoroValue
, expand :
ExpandType
) -> StyleSpan

#
StyleSpan::start

fn StyleSpan::start(self : StyleSpan) -> Int

#
TextElem

pub struct TextElem {
ch : Char
id :
IdFull

}

impl Show for TextElem

#
TextState

pub struct TextState {
elems : Array[RichtextElem]
}

impl Show for TextState

#
TextState::append_anchor

fn TextState::append_anchor(self : TextState, style : StyleOp, anchor : AnchorType) -> Unit

#
TextState::append_elem

fn TextState::append_elem(self : TextState, ch : Char, id :
IdFull
) -> Unit

#
TextState::apply_inner_op

#
TextState::delete

fn TextState::delete(self : TextState, start : Int, end : Int) -> Unit

#
TextState::delete_by_id

#
TextState::elems

fn TextState::elems(self : TextState) -> Array[TextElem]

#
TextState::id_at

#
TextState::ids_in_range

fn TextState::ids_in_range(self : TextState, start : Int, end : Int) -> Result[Array[
IdFull
],
LoroError
]

#
TextState::insert

fn TextState::insert(self : TextState, pos : Int, text : String, base_id :
IdFull
) -> Unit

#
TextState::insert_with_vv

fn TextState::insert_with_vv(self : TextState, pos : Int, text : String, base_id :
IdFull
, vv :
VersionVector
) -> Unit

#
TextState::len

fn TextState::len(self : TextState) -> Int

#
TextState::list_pos_to_text_pos

fn TextState::list_pos_to_text_pos(self : TextState, list_pos : Int) -> Int

#
TextState::new

fn TextState::new() -> TextState

#
TextState::plain_text

fn TextState::plain_text(self : TextState) -> String

#
TextState::raw_elems

fn TextState::raw_elems(self : TextState) -> Array[RichtextElem]

#
TextState::slice

fn TextState::slice(self : TextState, start : Int, end : Int) -> Result[String,
LoroError
]

#
TextState::styles

fn TextState::styles(self : TextState) -> Array[StyleSpan]

#
TextState::text_index_to_list_pos

fn TextState::text_index_to_list_pos(self : TextState, text_pos : Int) -> Result[Int,
LoroError
]

#
TextState::text_pos_to_list_pos

fn TextState::text_pos_to_list_pos(self : TextState, text_pos : Int) -> Int

#
TextState::to_richtext_value

#
TextState::to_value

#
TextState::unicode_index_from_utf16

fn TextState::unicode_index_from_utf16(self : TextState, offset : Int) -> Result[Int,
LoroError
]

#
TextState::unicode_index_from_utf8

fn TextState::unicode_index_from_utf8(self : TextState, offset : Int) -> Result[Int,
LoroError
]

#
TreeState

pub struct TreeState {
nodes : Map[
TreeID
, TreeNode]
}

impl Show for TreeState

#
TreeState::get_node

#
TreeState::new

fn TreeState::new() -> TreeState

#
TreeState::nodes

fn TreeState::nodes(self : TreeState) -> Array[TreeNode]

#
TreeState::roots

#
TreeState::set_node

fn TreeState::set_node(self : TreeState, node : TreeNode) -> Unit