Enum loro_internal::handler::Handler
source · pub enum Handler {
Text(TextHandler),
Map(MapHandler),
List(ListHandler),
Tree(TreeHandler),
}
Variants§
Implementations§
source§impl Handler
impl Handler
sourcepub fn as_text_mut(&mut self) -> Option<&mut TextHandler>
pub fn as_text_mut(&mut self) -> Option<&mut TextHandler>
Optionally returns mutable references to the inner fields if this is a Handler::Text
, otherwise None
sourcepub fn as_text(&self) -> Option<&TextHandler>
pub fn as_text(&self) -> Option<&TextHandler>
Optionally returns references to the inner fields if this is a Handler::Text
, otherwise None
sourcepub fn into_text(self) -> Result<TextHandler, Self>
pub fn into_text(self) -> Result<TextHandler, Self>
Returns the inner fields if this is a Handler::Text
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_map_mut(&mut self) -> Option<&mut MapHandler>
pub fn as_map_mut(&mut self) -> Option<&mut MapHandler>
Optionally returns mutable references to the inner fields if this is a Handler::Map
, otherwise None
sourcepub fn as_map(&self) -> Option<&MapHandler>
pub fn as_map(&self) -> Option<&MapHandler>
Optionally returns references to the inner fields if this is a Handler::Map
, otherwise None
sourcepub fn into_map(self) -> Result<MapHandler, Self>
pub fn into_map(self) -> Result<MapHandler, Self>
Returns the inner fields if this is a Handler::Map
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_list_mut(&mut self) -> Option<&mut ListHandler>
pub fn as_list_mut(&mut self) -> Option<&mut ListHandler>
Optionally returns mutable references to the inner fields if this is a Handler::List
, otherwise None
sourcepub fn as_list(&self) -> Option<&ListHandler>
pub fn as_list(&self) -> Option<&ListHandler>
Optionally returns references to the inner fields if this is a Handler::List
, otherwise None
sourcepub fn into_list(self) -> Result<ListHandler, Self>
pub fn into_list(self) -> Result<ListHandler, Self>
Returns the inner fields if this is a Handler::List
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_tree_mut(&mut self) -> Option<&mut TreeHandler>
pub fn as_tree_mut(&mut self) -> Option<&mut TreeHandler>
Optionally returns mutable references to the inner fields if this is a Handler::Tree
, otherwise None
sourcepub fn as_tree(&self) -> Option<&TreeHandler>
pub fn as_tree(&self) -> Option<&TreeHandler>
Optionally returns references to the inner fields if this is a Handler::Tree
, otherwise None
sourcepub fn into_tree(self) -> Result<TreeHandler, Self>
pub fn into_tree(self) -> Result<TreeHandler, Self>
Returns the inner fields if this is a Handler::Tree
, otherwise returns back the enum in the Err
case of the result