id stringlengths 20 30 | source stringclasses 1
value | chunk_index int64 0 520k | token_count int32 154 512 | content stringlengths 185 57.5k |
|---|---|---|---|---|
rust_dataset_chunk_519500 | rust_dataset.txt | 519,500 | 512 | ane = show_pane_with_id_payload.should_focus_pane;
Ok(PluginCommand::ShowPaneWithId(
pane_id,
should_float_if_hidden,
should_focus_pane,
))
},
_ => Err("Mismatched payload for ... |
rust_dataset_chunk_519501 | rust_dataset.txt | 519,501 | 512 | pane_id.try_into()?,
)),
_ => Err("Malformed edit_scrollback_for_pane_with_id payload"),
},
_ => Err("Mismatched payload for EditScrollback"),
},
Some(CommandName::GetPaneScrollback) => match protobuf_plugin_command.payload... |
rust_dataset_chunk_519502 | rust_dataset.txt | 519,502 | 512 | Some(Payload::SendSigkillToPaneIdPayload(pane_id)) => {
Ok(PluginCommand::SendSigkillToPaneId(pane_id.try_into()?))
},
_ => Err("Mismatched payload for SendSigkillToPaneId"),
},
Some(CommandName::GetPanePid) => match protobuf_pl... |
rust_dataset_chunk_519503 | rust_dataset.txt | 519,503 | 512 | ("Mismatched payload for OverrideLayout"),
},
Some(CommandName::SaveLayout) => match protobuf_plugin_command.payload {
Some(Payload::SaveLayoutPayload(save_layout_payload)) => {
Ok(PluginCommand::SaveLayout {
layout_name: save_layout_pa... |
rust_dataset_chunk_519504 | rust_dataset.txt | 519,504 | 512 | => {
match (move_payload.direction, move_payload.pane_id) {
(Some(direction), Some(pane_id)) => {
Ok(PluginCommand::MovePaneWithPaneIdInDirection(
pane_id.try_into()?,
... |
rust_dataset_chunk_519505 | rust_dataset.txt | 519,505 | 512 | ToTopInPaneId(pane_id.try_into()?))
},
_ => Err("Malformed scroll_to_top_in_pane_id_payload payload"),
}
},
_ => Err("Mismatched payload for ScrollToTopInPaneId"),
},
Some(CommandName::ScrollToBot... |
rust_dataset_chunk_519506 | rust_dataset.txt | 519,506 | 512 | }
},
_ => Err("Mismatched payload for TogglePaneIdFullscreen"),
},
Some(CommandName::TogglePaneEmbedOrEjectForPaneId) => {
match protobuf_plugin_command.payload {
Some(Payload::TogglePaneEmbedOrEjectForPaneIdPayload(
... |
rust_dataset_chunk_519507 | rust_dataset.txt | 519,507 | 512 | )),
_ => Err("Mismatched payload for BreakPanesToTabWithIndex"),
},
Some(CommandName::SwitchTabToId) => match protobuf_plugin_command.payload {
Some(Payload::SwitchTabToIdPayload(payload)) => {
Ok(PluginCommand::SwitchTabToId(pa... |
rust_dataset_chunk_519508 | rust_dataset.txt | 519,508 | 512 | ,
config: load_new_plugin_payload
.plugin_config
.into_iter()
.map(|e| (e.name, e.value))
.collect(),
load_in_background: load_new_plugin_payload
... |
rust_dataset_chunk_519509 | rust_dataset.txt | 519,509 | 512 | Some(CommandName::StackPanes) => match protobuf_plugin_command.payload {
Some(Payload::StackPanesPayload(stack_panes_payload)) => {
Ok(PluginCommand::StackPanes(
stack_panes_payload
.pane_ids
... |
rust_dataset_chunk_519510 | rust_dataset.txt | 519,510 | 512 | => match payload.pane_id {
Some(pane_id) => Ok(PluginCommand::SetPaneBorderStyle(
pane_id.try_into()?,
payload
.border_style
.map(BorderStyleOverride::from)
.unwrap_or... |
rust_dataset_chunk_519511 | rust_dataset.txt | 519,511 | 512 | Some(CommandName::OpenTerminalInPlaceOfPlugin) => match protobuf_plugin_command.payload
{
Some(Payload::OpenTerminalInPlaceOfPluginPayload(
open_terminal_in_place_of_plugin_payload,
)) => match open_terminal_in_place_of_plugin_payload.file_to_open {
... |
rust_dataset_chunk_519512 | rust_dataset.txt | 519,512 | 512 | _replace,
context,
))
},
None => Err("Malformed open command pane in place of plugin payload"),
},
_ => Err("Mismatched payload for OpenCommandPaneInPlaceOfPlugin"),
... |
rust_dataset_chunk_519513 | rust_dataset.txt | 519,513 | 512 | _to_open_payload.close_plugin_after_replace,
context,
))
},
None => Err("Malformed open file in place payload"),
}
},
_ => Err("Mismatched payload for OpenFileI... |
rust_dataset_chunk_519514 | rust_dataset.txt | 519,514 | 512 | .collect(),
)),
_ => Err("Mismatched payload for HighlightAndUnhighlightPanes"),
}
},
Some(CommandName::CloseMultiplePanes) => match protobuf_plugin_command.payload {
Some(Payload::CloseMultiplePanesPayload(close_multiple_p... |
rust_dataset_chunk_519515 | rust_dataset.txt | 519,515 | 512 | }
},
Some(CommandName::SetSelfCollapsed) => match protobuf_plugin_command.payload {
Some(Payload::SetSelfCollapsedPayload(set_self_collapsed_payload)) => Ok(
PluginCommand::SetSelfCollapsed(set_self_collapsed_payload.collapsed),
),
... |
rust_dataset_chunk_519516 | rust_dataset.txt | 519,516 | 512 | found a payload"),
None => Ok(PluginCommand::ClearKeyPressesIntercepts),
},
Some(CommandName::ReplacePaneWithExistingPane) => match protobuf_plugin_command.payload
{
Some(Payload::ReplacePaneWithExistingPanePayload(
replace_pane_wi... |
rust_dataset_chunk_519517 | rust_dataset.txt | 519,517 | 512 | (payload)) => {
Ok(PluginCommand::ParseLayout(payload.layout_string))
},
_ => Err("Mismatched payload for ParseLayout"),
},
Some(CommandName::GetLayoutDir) => Ok(PluginCommand::GetLayoutDir),
Some(CommandName::GetFocusedPaneInfo) =>... |
rust_dataset_chunk_519518 | rust_dataset.txt | 519,518 | 512 | Some(CommandName::OpenPluginPopup) => match protobuf_plugin_command.payload {
Some(Payload::OpenPluginPopupPayload(payload)) => {
Ok(PluginCommand::OpenPluginPopup {
plugin_url: payload.plugin_url,
configuration: payload
... |
rust_dataset_chunk_519519 | rust_dataset.txt | 519,519 | 512 | .payload {
Some(Payload::UnsetConfigSettingPayload(key)) => SettingKey::from_id(&key)
.map(PluginCommand::UnsetConfigSetting)
.ok_or("Unknown setting for UnsetConfigSetting"),
_ => Err("Mismatched payload for UnsetConfigSetting"),
},
... |
rust_dataset_chunk_519520 | rust_dataset.txt | 519,520 | 512 | ::SetPopupFocused) => match protobuf_plugin_command.payload {
Some(Payload::SetPopupFocusedPayload(focused)) => {
Ok(PluginCommand::SetPopupFocused(focused))
},
_ => Err("Mismatched payload for SetPopupFocused"),
},
Some(Command... |
rust_dataset_chunk_519521 | rust_dataset.txt | 519,521 | 512 | = session_pane_from_payload(payload)?;
Ok(PluginCommand::MarkSessionPaneSeen {
session_name,
pane_id,
})
},
_ => Err("Mismatched payload for MarkSessionPaneSeen"),
},
Some(Com... |
rust_dataset_chunk_519522 | rust_dataset.txt | 519,522 | 512 | },
Some(CommandName::ToggleSessionPaneMute) => match protobuf_plugin_command.payload {
Some(Payload::ToggleSessionPaneMutePayload(payload)) => {
let (session_name, pane_id) = session_pane_from_payload(payload)?;
Ok(PluginCommand::ToggleSess... |
rust_dataset_chunk_519523 | rust_dataset.txt | 519,523 | 512 | ))
},
None => Ok(PluginCommand::HideBars(vec![])),
_ => Err("Mismatched payload for HideBars"),
},
Some(CommandName::ShowBars) => match protobuf_plugin_command.payload {
None => Ok(PluginCommand::ShowBars),
_ => Err(... |
rust_dataset_chunk_519524 | rust_dataset.txt | 519,524 | 512 | Prompt"),
},
Some(CommandName::ReplyToPrompt) => match protobuf_plugin_command.payload {
Some(Payload::ReplyToPromptPayload(payload)) => Ok(PluginCommand::ReplyToPrompt {
request_id: payload.request_id,
result: payload
... |
rust_dataset_chunk_519525 | rust_dataset.txt | 519,525 | 512 | Payload(get_pane_info_payload)) => {
let pane_id = get_pane_info_payload
.pane_id
.ok_or("Malformed pane_id for GetPaneInfo")
.and_then(|p| p.try_into())?;
Ok(PluginCommand::GetPaneInfo(pane_id))
... |
rust_dataset_chunk_519526 | rust_dataset.txt | 519,526 | 512 | PluginPaneInNewTab"),
},
Some(CommandName::OpenEditorPaneInNewTab) => match protobuf_plugin_command.payload {
Some(Payload::OpenEditorPaneInNewTabPayload(payload)) => {
match payload.file_to_open {
Some(file) => {
... |
rust_dataset_chunk_519527 | rust_dataset.txt | 519,527 | 512 | => Err("Malformed open_terminal_pane_in_place_of_pane_id payload"),
}
},
_ => Err("Mismatched payload for OpenTerminalPaneInPlaceOfPaneId"),
}
},
Some(CommandName::OpenEditPaneInPlaceOfPaneId) => {
m... |
rust_dataset_chunk_519528 | rust_dataset.txt | 519,528 | 512 | payload"),
},
_ => Err("Mismatched payload for SetPaneColor"),
},
Some(CommandName::SetPaneRegexHighlights) => {
match protobuf_plugin_command.payload {
Some(Payload::SetPaneRegexHighlightsPayload(p)) => {
... |
rust_dataset_chunk_519529 | rust_dataset.txt | 519,529 | 512 | },
Some(ProtobufHighlightStyleVariant::BackgroundEmphasis3(_)) => {
HighlightStyle::BackgroundEmphasis3
},
Some(ProtobufHighlightStyleVa... |
rust_dataset_chunk_519530 | rust_dataset.txt | 519,530 | 512 | => Err("Mismatched payload for OpenPluginPaneFloating"),
},
None => Err("Unrecognized plugin command"),
}
}
}
impl TryFrom<PluginCommand> for ProtobufPluginCommand {
type Error = &'static str;
fn try_from(plugin_command: PluginCommand) -> Result<Self, &'static str> {
... |
rust_dataset_chunk_519531 | rust_dataset.txt | 519,531 | 512 | { name, value })
.collect(),
})),
}),
PluginCommand::OpenFileFloating(file_to_open, floating_pane_coordinates, context) => {
Ok(ProtobufPluginCommand {
name: CommandName::OpenFileFloating as i32,
pay... |
rust_dataset_chunk_519532 | rust_dataset.txt | 519,532 | 512 | CommandName::OpenCommandPaneFloating as i32,
payload: Some(Payload::OpenCommandPaneFloatingPayload(
OpenCommandPanePayload {
command_to_run: Some(command_to_run.try_into()?),
floating_pane_coordinates: floating_pane_coo... |
rust_dataset_chunk_519533 | rust_dataset.txt | 519,533 | 512 | _layout) => Ok(ProtobufPluginCommand {
name: CommandName::NewTabsWithLayout as i32,
payload: Some(Payload::NewTabsWithLayoutPayload(raw_layout)),
}),
PluginCommand::NewTab { name, cwd } => Ok(ProtobufPluginCommand {
name: CommandName::NewTab as i32... |
rust_dataset_chunk_519534 | rust_dataset.txt | 519,534 | 512 | })),
}),
PluginCommand::FocusNextPane => Ok(ProtobufPluginCommand {
name: CommandName::FocusNextPane as i32,
payload: None,
}),
PluginCommand::FocusPreviousPane => Ok(ProtobufPluginCommand {
name: CommandName::FocusPrevious... |
rust_dataset_chunk_519535 | rust_dataset.txt | 519,535 | 512 | name: CommandName::ClearScreen as i32,
payload: None,
}),
PluginCommand::ScrollUp => Ok(ProtobufPluginCommand {
name: CommandName::ScrollUp as i32,
payload: None,
}),
PluginCommand::ScrollDown => Ok(ProtobufP... |
rust_dataset_chunk_519536 | rust_dataset.txt | 519,536 | 512 | name: CommandName::UndoRenamePane as i32,
payload: None,
}),
PluginCommand::CloseFocus => Ok(ProtobufPluginCommand {
name: CommandName::CloseFocus as i32,
payload: None,
}),
PluginCommand::ToggleActiveTabSync => Ok(Protobuf... |
rust_dataset_chunk_519537 | rust_dataset.txt | 519,537 | 512 | PluginCommand::StartOrReloadPlugin(url) => Ok(ProtobufPluginCommand {
name: CommandName::StartOrReloadPlugin as i32,
payload: Some(Payload::StartOrReloadPluginPayload(url)),
}),
PluginCommand::CloseTerminalPane(pane_id) => Ok(ProtobufPluginCommand {
... |
rust_dataset_chunk_519538 | rust_dataset.txt | 519,538 | 512 | ayload::RenameTabPayload(IdAndNewName {
id: tab_index,
new_name,
})),
}),
PluginCommand::ReportPanic(payload) => Ok(ProtobufPluginCommand {
name: CommandName::ReportCrash as i32,
payload: Some(Payload::Report... |
rust_dataset_chunk_519539 | rust_dataset.txt | 519,539 | 512 | ),
floating_pane_coordinates: None,
context: context
.into_iter()
.map(|(name, value)| ContextItem { name, value })
.collect(),
})),
}),
PluginCommand::OpenCommandPaneI... |
rust_dataset_chunk_519540 | rust_dataset.txt | 519,540 | 512 | payload: Some(Payload::DeleteDeadSessionPayload(dead_session_name)),
}),
PluginCommand::DeleteAllDeadSessions => Ok(ProtobufPluginCommand {
name: CommandName::DeleteAllDeadSessions as i32,
payload: None,
}),
PluginCommand::R... |
rust_dataset_chunk_519541 | rust_dataset.txt | 519,541 | 512 | new_plugin_args: message_to_plugin.new_plugin_args.map(|m_t_p| {
ProtobufNewPluginArgs {
should_float: m_t_p.should_float,
pane_id_to_replace: m_t_p
.pane_id_to_replace... |
rust_dataset_chunk_519542 | rust_dataset.txt | 519,542 | 512 | Ok(ProtobufPluginCommand {
name: CommandName::DeleteDeadSessionAndReply as i32,
payload: Some(Payload::DeleteDeadSessionAndReplyPayload(dead_session_name)),
})
},
PluginCommand::DeleteAllDeadSessionsAndReply => Ok(ProtobufPluginCommand {
... |
rust_dataset_chunk_519543 | rust_dataset.txt | 519,543 | 512 | WithId as i32,
payload: Some(Payload::ShowPaneWithIdPayload(ShowPaneWithIdPayload {
pane_id: ProtobufPaneId::try_from(pane_id_to_show).ok(),
should_float_if_hidden,
should_focus_pane,
})),
}),
PluginComma... |
rust_dataset_chunk_519544 | rust_dataset.txt | 519,544 | 512 | )),
}),
PluginCommand::WriteToPaneId(bytes_to_write, pane_id) => Ok(ProtobufPluginCommand {
name: CommandName::WriteToPaneId as i32,
payload: Some(Payload::WriteToPaneIdPayload(WriteToPaneIdPayload {
bytes_to_write,
pane_id... |
rust_dataset_chunk_519545 | rust_dataset.txt | 519,545 | 512 | _existing_terminal_panes,
retain_existing_plugin_panes,
apply_only_to_active_tab,
context,
) => Ok(ProtobufPluginCommand {
name: CommandName::OverrideLayout as i32,
payload: Some(Payload::OverrideLayoutPayload(OverrideLayoutPayl... |
rust_dataset_chunk_519546 | rust_dataset.txt | 519,546 | 512 | {
Ok(ProtobufPluginCommand {
name: CommandName::MovePaneWithPaneIdInDirection as i32,
payload: Some(Payload::MovePaneWithPaneIdInDirectionPayload(
MovePaneWithPaneIdInDirectionPayload {
pane_id: Some(pane_id.try... |
rust_dataset_chunk_519547 | rust_dataset.txt | 519,547 | 512 | ScrollUpInPaneIdPayload(
PageScrollUpInPaneIdPayload {
pane_id: Some(pane_id.try_into()?),
},
)),
}),
PluginCommand::PageScrollDownInPaneId(pane_id) => Ok(ProtobufPluginCommand {
name: CommandName::Pa... |
rust_dataset_chunk_519548 | rust_dataset.txt | 519,548 | 512 | _to_target_tab,
) => Ok(ProtobufPluginCommand {
name: CommandName::BreakPanesToTabWithIndex as i32,
payload: Some(Payload::BreakPanesToTabWithIndexPayload(
BreakPanesToTabWithIndexPayload {
pane_ids: pane_ids
... |
rust_dataset_chunk_519549 | rust_dataset.txt | 519,549 | 512 | : CommandName::ReloadPlugin as i32,
payload: Some(Payload::ReloadPluginPayload(ReloadPluginPayload {
plugin_id,
})),
}),
PluginCommand::LoadNewPlugin {
url,
config,
load_in_background,
... |
rust_dataset_chunk_519550 | rust_dataset.txt | 519,550 | 512 | PluginCommand {
name: CommandName::StackPanes as i32,
payload: Some(Payload::StackPanesPayload(StackPanesPayload {
pane_ids: pane_ids
.into_iter()
.filter_map(|p_id| p_id.try_into().ok())
.collect... |
rust_dataset_chunk_519551 | rust_dataset.txt | 519,551 | 512 | .collect();
Ok(ProtobufPluginCommand {
name: CommandName::OpenCommandPaneNearPlugin as i32,
payload: Some(Payload::OpenCommandPaneNearPluginPayload(
OpenCommandPaneNearPluginPayload {
command_to_run: Some(comman... |
rust_dataset_chunk_519552 | rust_dataset.txt | 519,552 | 512 | ),
close_plugin_after_replace,
context: vec![], // will be added in the future
},
)),
})
},
PluginCommand::OpenCommandPaneInPlaceOfPlugin(
command_to_run,
... |
rust_dataset_chunk_519553 | rust_dataset.txt | 519,553 | 512 | ),
floating_pane_coordinates: None,
close_plugin_after_replace,
context: context
.into_iter()
.map(|(name, value)| ContextItem { name, value })
.collect(),
... |
rust_dataset_chunk_519554 | rust_dataset.txt | 519,554 | 512 | CloseMultiplePanesPayload(
CloseMultiplePanesPayload {
pane_ids: pane_ids.iter().filter_map(|&p| p.try_into().ok()).collect(),
},
)),
}),
PluginCommand::FloatMultiplePanes(pane_ids) => Ok(ProtobufPluginCommand {
... |
rust_dataset_chunk_519555 | rust_dataset.txt | 519,555 | 512 | LoginToken as i32,
payload: Some(Payload::RevokeWebLoginTokenPayload(
RevokeWebLoginTokenPayload { token_label },
)),
}),
PluginCommand::ListWebLoginTokens => Ok(ProtobufPluginCommand {
name: CommandName::ListWebLoginTokens as i... |
rust_dataset_chunk_519556 | rust_dataset.txt | 519,556 | 512 | })),
})
},
PluginCommand::CopyToClipboard(text) => Ok(ProtobufPluginCommand {
name: CommandName::CopyToClipboard as i32,
payload: Some(Payload::CopyToClipboardPayload(CopyToClipboardPayload {
text,
... |
rust_dataset_chunk_519557 | rust_dataset.txt | 519,557 | 512 | Some(Payload::HideSlotPayload(slot_id)),
}),
PluginCommand::ShowSlot(slot_id, should_float_if_hidden) => Ok(ProtobufPluginCommand {
name: CommandName::ShowSlot as i32,
payload: Some(Payload::ShowSlotPayload(ShowSlotPayload {
slot_id,
... |
rust_dataset_chunk_519558 | rust_dataset.txt | 519,558 | 512 | ::ReadConfig => Ok(ProtobufPluginCommand {
name: CommandName::ReadConfig as i32,
payload: Some(Payload::ReadConfigPayload(ReadConfigPayload {})),
}),
PluginCommand::RevertConfig(key) => Ok(ProtobufPluginCommand {
name: CommandName::RevertConfig as ... |
rust_dataset_chunk_519559 | rust_dataset.txt | 519,559 | 512 | PromptPayload(ReplyToPromptPayload {
request_id,
result: Some(result.into()),
})),
}),
PluginCommand::SaveKeybindsAsPreset { new_name } => Ok(ProtobufPluginCommand {
name: CommandName::SaveKeybindsAsPreset as i32,
... |
rust_dataset_chunk_519560 | rust_dataset.txt | 519,560 | 512 | | p.1),
layout: switch_to_session.layout.and_then(|l| l.try_into().ok()),
cwd: switch_to_session.cwd.map(|c| c.display().to_string()),
},
)),
})
},
PluginCommand::GetSessionPreview... |
rust_dataset_chunk_519561 | rust_dataset.txt | 519,561 | 512 | ,
payload: Some(Payload::WriteToSessionPanePayload(
WriteToSessionPanePayload {
session_name,
pane_id: Some(pane_id.try_into()?),
bytes_to_write: bytes,
},
)),
}),
... |
rust_dataset_chunk_519562 | rust_dataset.txt | 519,562 | 512 | ::ToggleBars as i32,
payload: Some(Payload::ToggleBarsPayload(ProtobufBarNamesPayload {
bar_names,
})),
}),
PluginCommand::HideBars(bar_names) => Ok(ProtobufPluginCommand {
name: CommandName::HideBars as i32,
pay... |
rust_dataset_chunk_519563 | rust_dataset.txt | 519,563 | 512 | : trigger.target.name().to_owned(),
})
.collect(),
write_config_to_disk,
})),
}),
PluginCommand::ResetKeys {
keys,
write_config_to_disk,
} => Ok(ProtobufPluginCommand {... |
rust_dataset_chunk_519564 | rust_dataset.txt | 519,564 | 512 | ,
payload: Some(Payload::GetSessionEnvironmentVariablesPayload(payload)),
})
},
PluginCommand::OpenCommandPaneInNewTab(command_to_run, context) => {
let context: Vec<_> = context
.into_iter()
.map(|(name,... |
rust_dataset_chunk_519565 | rust_dataset.txt | 519,565 | 512 | InPlaceOfPaneId as i32,
payload: Some(Payload::OpenCommandPaneInPlaceOfPaneIdPayload(
OpenCommandPaneInPlaceOfPaneIdPayload {
pane_id_to_replace: Some(pane_id.try_into()?),
command_to_run: Some(command_to_run.try_into()?... |
rust_dataset_chunk_519566 | rust_dataset.txt | 519,566 | 512 | id| id as u32),
},
)),
}),
PluginCommand::SetPaneColor(pane_id, fg, bg) => Ok(ProtobufPluginCommand {
name: CommandName::SetPaneColor as i32,
payload: Some(Payload::SetPaneColorPayload(SetPaneColorPayload {
p... |
rust_dataset_chunk_519567 | rust_dataset.txt | 519,567 | 512 | HighlightStyleVariant::BackgroundEmphasis1(true)
},
HighlightStyle::BackgroundEmphasis2 => {
ProtobufHighlightStyleVariant::BackgroundEmphasis2(true)
},
... |
rust_dataset_chunk_519568 | rust_dataset.txt | 519,568 | 512 | types
use crate::data::{
BreakPanesToNewTabResponse, BreakPanesToTabWithIdResponse, BreakPanesToTabWithIndexResponse,
FocusOrCreateTabResponse, NewTabResponse, NewTabUnfocusedResponse, NewTabsResponse,
NewTiledPaneInTabResponse, OpenCommandPaneBackgroundResponse,
OpenCommandPaneFloatingNearPluginRespon... |
rust_dataset_chunk_519569 | rust_dataset.txt | 519,569 | 512 | (None),
}
}
}
impl From<NewTabUnfocusedResponse> for ProtobufNewTabUnfocusedResponse {
fn from(response: NewTabUnfocusedResponse) -> Self {
match response {
Some(tab_id) => ProtobufNewTabUnfocusedResponse {
result: Some(new_tab_unfocused_response::Result::TabId(tab_i... |
rust_dataset_chunk_519570 | rust_dataset.txt | 519,570 | 512 | fn from(response: FocusOrCreateTabResponse) -> Self {
match response {
Some(tab_id) => ProtobufFocusOrCreateTabResponse {
result: Some(focus_or_create_tab_response::Result::TabId(tab_id as u64)),
},
None => ProtobufFocusOrCreateTabResponse {
... |
rust_dataset_chunk_519571 | rust_dataset.txt | 519,571 | 512 | (break_panes_to_tab_with_index_response::Result::TabId(
tab_id as u64,
)),
},
None => ProtobufBreakPanesToTabWithIndexResponse {
result: Some(break_panes_to_tab_with_index_response::Result::None(true)),
},
}
}
}
impl Tr... |
rust_dataset_chunk_519572 | rust_dataset.txt | 519,572 | 512 | Some(pane_id) => Ok(Some(pane_id.try_into()?)),
None => Ok(None),
}
}
}
impl From<OpenFileFloatingResponse> for ProtobufOpenFileFloatingResponse {
fn from(response: OpenFileFloatingResponse) -> Self {
ProtobufOpenFileFloatingResponse {
pane_id: response.map(|p| p.try_in... |
rust_dataset_chunk_519573 | rust_dataset.txt | 519,573 | 512 | response.map(|p| p.try_into().unwrap()),
}
}
}
impl TryFrom<ProtobufOpenFileInPlaceOfPluginResponse> for OpenFileInPlaceOfPluginResponse {
type Error = &'static str;
fn try_from(protobuf: ProtobufOpenFileInPlaceOfPluginResponse) -> Result<Self, Self::Error> {
match protobuf.pane_id {
... |
rust_dataset_chunk_519574 | rust_dataset.txt | 519,574 | 512 | Ok(Some(pane_id.try_into()?)),
None => Ok(None),
}
}
}
impl From<OpenTerminalInPlaceResponse> for ProtobufOpenTerminalInPlaceResponse {
fn from(response: OpenTerminalInPlaceResponse) -> Self {
ProtobufOpenTerminalInPlaceResponse {
pane_id: response.map(|p| p.try_into().... |
rust_dataset_chunk_519575 | rust_dataset.txt | 519,575 | 512 | OfPluginResponse) -> Self {
ProtobufOpenTerminalInPlaceOfPluginResponse {
pane_id: response.map(|p| p.try_into().unwrap()),
}
}
}
impl TryFrom<ProtobufOpenCommandPaneResponse> for OpenCommandPaneResponse {
type Error = &'static str;
fn try_from(protobuf: ProtobufOpenCommandPaneR... |
rust_dataset_chunk_519576 | rust_dataset.txt | 519,576 | 512 | ProtobufOpenCommandPaneNearPluginResponse) -> Result<Self, Self::Error> {
match protobuf.pane_id {
Some(pane_id) => Ok(Some(pane_id.try_into()?)),
None => Ok(None),
}
}
}
impl From<OpenCommandPaneNearPluginResponse> for ProtobufOpenCommandPaneNearPluginResponse {
fn fro... |
rust_dataset_chunk_519577 | rust_dataset.txt | 519,577 | 512 | .pane_id {
Some(pane_id) => Ok(Some(pane_id.try_into()?)),
None => Ok(None),
}
}
}
impl From<OpenCommandPaneBackgroundResponse> for ProtobufOpenCommandPaneBackgroundResponse {
fn from(response: OpenCommandPaneBackgroundResponse) -> Self {
ProtobufOpenCommandPaneBackgroun... |
rust_dataset_chunk_519578 | rust_dataset.txt | 519,578 | 512 | &'static str;
fn try_from(
protobuf: ProtobufOpenTerminalPaneInPlaceOfPaneIdResponse,
) -> Result<Self, Self::Error> {
match protobuf.pane_id {
Some(pane_id) => Ok(Some(pane_id.try_into()?)),
None => Ok(None),
}
}
}
impl From<OpenTerminalPaneInPlaceOfPaneIdR... |
rust_dataset_chunk_519579 | rust_dataset.txt | 519,579 | 512 | {
use crate::data::{ConfigSettingState, ConfigSnapshot, SettingKey};
use prost::Message;
let original = ConfigSnapshot {
settings: vec![
ConfigSettingState {
key: SettingKey::TerminalOpacity,
saved_value: Some("1".to_owned()),
... |
rust_dataset_chunk_519580 | rust_dataset.txt | 519,580 | 512 | original =
PluginCommand::TogglePaneEmbedOrEjectForPaneId(PaneId::Terminal(2), show_and_focus);
let protobuf: ProtobufPluginCommand = original.try_into().expect("encode");
let decoded: PluginCommand = protobuf.try_into().expect("decode");
match decoded {
... |
rust_dataset_chunk_519581 | rust_dataset.txt | 519,581 | 512 | ::data::{InputMode, MouseTarget, MouseTrigger};
let triggers = vec![
(
InputMode::Normal,
MouseTrigger::parse("Ctrl Double Left", MouseTarget::Frame).unwrap(),
),
(
InputMode::Locked,
MouseTrigger::parse("Alt Scr... |
rust_dataset_chunk_519582 | rust_dataset.txt | 519,582 | 512 | (vec!["ScrollColumns 4".to_owned()]),
unsaved: false,
},
];
let snapshot = ConfigSnapshot {
mousebindings: entries.clone(),
keybinds: KeybindsSelectionSnapshot {
has_own_mousebindings: true,
..Default::default()
... |
rust_dataset_chunk_519583 | rust_dataset.txt | 519,583 | 512 | Request, PromptResult, PromptValue};
use prost::Message;
let request = PromptRequest::choose(vec!["a", "b"])
.multi()
.placement(PromptPlacement::Mouse);
let original = PluginCommand::Prompt {
request_id: 7,
request: request.clone(),
};
... |
rust_dataset_chunk_519584 | rust_dataset.txt | 519,584 | 512 | {
name,
tab_index: decoded_tab,
pane_id: decoded_pane,
anchor,
} => {
assert_eq!(anchor, Some(crate::data::PreviewAnchor::LastCommandOutput));
assert_eq!(name, "api");
... |
rust_dataset_chunk_519585 | rust_dataset.txt | 519,585 | 512 | Plugin(4)),
false,
)),
PluginCommand::OpenSessionTerminal(crate::data::SessionTerminalRequest::new_session(
None,
Some(crate::data::LayoutInfo::BuiltIn("compact".to_owned())),
Some(PathBuf::from("/tmp")),
)),
... |
rust_dataset_chunk_519586 | rust_dataset.txt | 519,586 | 512 | (0)),
5,
6,
7,
8,
)
})),
PluginCommand::SetLiveViewInput(true),
PluginCommand::SetLiveViewInput(false),
];
for original in commands {
let protobuf: ProtobufPlug... |
rust_dataset_chunk_519587 | rust_dataset.txt | 519,587 | 512 | decoded_coordinates.unwrap().border_style,
Some(border_style)
);
},
other => panic!("expected OpenTerminalFloating, got {:?}", other),
}
}
#[test]
fn a_file_to_open_carries_a_border_style_over_protobuf() {
use c... |
rust_dataset_chunk_519588 | rust_dataset.txt | 519,588 | 512 | assert_eq!(decoded_style, style)
},
other => panic!("expected SetPaneFrameStyle, got {:?}", other),
}
}
}
#[test]
fn new_pane_protobuf_round_trip() {
let original = PluginCommand::NewPane;
let protobuf: ProtobufPluginCo... |
rust_dataset_chunk_519589 | rust_dataset.txt | 519,589 | 512 | ProtobufPluginCommand = original.try_into().expect("encode");
let decoded: PluginCommand = protobuf.try_into().expect("decode");
match decoded {
PluginCommand::ToggleFloatingPanes { tab_id } => assert_eq!(tab_id, Some(2)),
other => panic!("expected ToggleFloatingPanes, got {:?}"... |
rust_dataset_chunk_519590 | rust_dataset.txt | 519,590 | 512 | { key, value })
.collect(),
}
}
fn plugin_entry_from_protobuf(entry: ProtobufPluginEntry) -> PluginEntry {
PluginEntry {
location: entry.location,
cwd: entry.cwd,
configuration: entry
.configuration
.into_iter()
.map(|pair| (pair.key, pai... |
rust_dataset_chunk_519591 | rust_dataset.txt | 519,591 | 512 | _entry_from_protobuf)
.unwrap_or_default(),
})
.collect(),
load_plugins: blocks
.load_plugins
.into_iter()
.map(plugin_entry_from_protobuf)
.collect(),
env: blocks
... |
rust_dataset_chunk_519592 | rust_dataset.txt | 519,592 | 512 | entry.preset_actions.unwrap_or_default()
},
preset_same_as_actions,
actions: entry.actions,
source: source as i32,
shared_block,
unbound: entry.unbound,
unsaved: entry.unsaved,
}
}
}
fn mouse_trigger_from_pr... |
rust_dataset_chunk_519593 | rust_dataset.txt | 519,593 | 512 | : entry.trigger.to_kdl(),
target: entry.trigger.target.name().to_owned(),
actions: entry.actions,
app_first: entry.app_first,
source: source as i32,
shared_block,
unbound: entry.unbound,
has_preset_binding: entry.preset_actions.is_some(... |
rust_dataset_chunk_519594 | rust_dataset.txt | 519,594 | 512 | }
impl From<KeybindsSelectionSnapshot> for ProtobufKeybindsSelectionSnapshot {
fn from(snapshot: KeybindsSelectionSnapshot) -> Self {
ProtobufKeybindsSelectionSnapshot {
preset: snapshot.preset,
primary: snapshot.primary,
secondary: snapshot.secondary,
unlock... |
rust_dataset_chunk_519595 | rust_dataset.txt | 519,595 | 512 | | ConfigSettingState {
key,
saved_value: setting.saved_value,
current_value: setting.current_value,
set_in_file: setting.set_in_file,
})
})
.collect(),
config_f... |
rust_dataset_chunk_519596 | rust_dataset.txt | 519,596 | 512 | view.y as usize,
cols: view.cols as usize,
rows: view.rows as usize,
resize_allowed: view.resize_allowed,
view_only: view.view_only,
})
}
#[cfg(test)]
mod live_view_command_tests {
#[test]
fn the_numbers_of_the_removed_mirror_commands_stay_reserved() {
let proto = i... |
rust_dataset_chunk_519597 | rust_dataset.txt | 519,597 | 512 | }
impl TryFrom<&str> for ProtobufZellijVersion {
type Error = &'static str;
fn try_from(zellij_version: &str) -> Result<Self, &'static str> {
Ok(ProtobufZellijVersion {
version: zellij_version.to_owned(),
})
}
}
--- FILE: zellij/zellij-utils/src/plugin_api/plugin_permission.rs... |
rust_dataset_chunk_519598 | rust_dataset.txt | 519,598 | 512 | EnvironmentVariables)
},
}
}
}
impl TryFrom<PermissionType> for ProtobufPermissionType {
type Error = &'static str;
fn try_from(permission: PermissionType) -> Result<Self, &'static str> {
match permission {
PermissionType::ReadApplicationState => {
Ok... |
rust_dataset_chunk_519599 | rust_dataset.txt | 519,599 | 512 | Spec,
MenuSpec as ProtobufMenuSpec, NotifySpec as ProtobufNotifySpec,
NumberSpec as ProtobufNumberSpec, PromptCancelled as ProtobufPromptCancelled,
PromptFormEntry as ProtobufPromptFormEntry, PromptFormValue as ProtobufPromptFormValue,
PromptPlacement as ProtobufPromptPlacement, PromptPlacementKind as P... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.