Enum loro_internal::delta::DeltaItem
source · pub enum DeltaItem<Value, Meta> {
Retain {
retain: usize,
attributes: Meta,
},
Insert {
insert: Value,
attributes: Meta,
},
Delete {
delete: usize,
attributes: Meta,
},
}Variants§
Implementations§
source§impl<Value, Meta> DeltaItem<Value, Meta>
impl<Value, Meta> DeltaItem<Value, Meta>
sourcepub fn as_retain_mut(&mut self) -> Option<(&mut usize, &mut Meta)>
pub fn as_retain_mut(&mut self) -> Option<(&mut usize, &mut Meta)>
Optionally returns mutable references to the inner fields if this is a DeltaItem::Retain, otherwise None
sourcepub fn as_retain(&self) -> Option<(&usize, &Meta)>
pub fn as_retain(&self) -> Option<(&usize, &Meta)>
Optionally returns references to the inner fields if this is a DeltaItem::Retain, otherwise None
sourcepub fn into_retain(self) -> Result<(usize, Meta), Self>
pub fn into_retain(self) -> Result<(usize, Meta), Self>
Returns the inner fields if this is a DeltaItem::Retain, otherwise returns back the enum in the Err case of the result
sourcepub fn as_insert_mut(&mut self) -> Option<(&mut Value, &mut Meta)>
pub fn as_insert_mut(&mut self) -> Option<(&mut Value, &mut Meta)>
Optionally returns mutable references to the inner fields if this is a DeltaItem::Insert, otherwise None
sourcepub fn as_insert(&self) -> Option<(&Value, &Meta)>
pub fn as_insert(&self) -> Option<(&Value, &Meta)>
Optionally returns references to the inner fields if this is a DeltaItem::Insert, otherwise None
sourcepub fn into_insert(self) -> Result<(Value, Meta), Self>
pub fn into_insert(self) -> Result<(Value, Meta), Self>
Returns the inner fields if this is a DeltaItem::Insert, otherwise returns back the enum in the Err case of the result
sourcepub fn as_delete_mut(&mut self) -> Option<(&mut usize, &mut Meta)>
pub fn as_delete_mut(&mut self) -> Option<(&mut usize, &mut Meta)>
Optionally returns mutable references to the inner fields if this is a DeltaItem::Delete, otherwise None
sourcepub fn as_delete(&self) -> Option<(&usize, &Meta)>
pub fn as_delete(&self) -> Option<(&usize, &Meta)>
Optionally returns references to the inner fields if this is a DeltaItem::Delete, otherwise None
sourcepub fn into_delete(self) -> Result<(usize, Meta), Self>
pub fn into_delete(self) -> Result<(usize, Meta), Self>
Returns the inner fields if this is a DeltaItem::Delete, otherwise returns back the enum in the Err case of the result