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_517900 | rust_dataset.txt | 517,900 | 512 | Home = 7,
End = 8,
Backspace = 9,
Delete = 10,
Insert = 11,
F1 = 12,
F2 = 13,
F3 = 14,
F4 = 15,
F5 = 16,
F6 = 17,
F7 = 18,
F8 = 19,
F9 = 20,
F10 = 21,
F11 = 22,
F12 = 23,
Char = 24,
Tab = 25,
Esc = 26,
Enter = 27,
CapsLock = 28,
... |
rust_dataset_chunk_517901 | rust_dataset.txt | 517,901 | 512 | => "BARE_KEY_F8",
BareKey::F9 => "BARE_KEY_F9",
BareKey::F10 => "BARE_KEY_F10",
BareKey::F11 => "BARE_KEY_F11",
BareKey::F12 => "BARE_KEY_F12",
BareKey::Char => "BARE_KEY_CHAR",
BareKey::Tab => "BARE_KEY_TAB",
BareKey::Esc => "BARE_KEY... |
rust_dataset_chunk_517902 | rust_dataset.txt | 517,902 | 512 | _KEY_F8" => Some(Self::F8),
"BARE_KEY_F9" => Some(Self::F9),
"BARE_KEY_F10" => Some(Self::F10),
"BARE_KEY_F11" => Some(Self::F11),
"BARE_KEY_F12" => Some(Self::F12),
"BARE_KEY_CHAR" => Some(Self::Char),
"BARE_KEY_TAB" => Some(Self::Tab),
... |
rust_dataset_chunk_517903 | rust_dataset.txt | 517,903 | 512 | "KEY_MODIFIER_SHIFT" => Some(Self::Shift),
"KEY_MODIFIER_SUPER" => Some(Self::Super),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LineStyle {
Single = 0,
Double = 1,
Heavy = 2... |
rust_dataset_chunk_517904 | rust_dataset.txt | 517,904 | 512 | 15,
BrightWhite = 16,
}
impl AnsiCode {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&... |
rust_dataset_chunk_517905 | rust_dataset.txt | 517,905 | 512 | (Self::BrightCyan),
"BRIGHT_WHITE" => Some(Self::BrightWhite),
_ => None,
}
}
}
/// Supporting enums and messages
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum InputMode {
Unspecified = 0,
Normal = 1,
Locke... |
rust_dataset_chunk_517906 | rust_dataset.txt | 517,906 | 512 | (Self::Normal),
"INPUT_MODE_LOCKED" => Some(Self::Locked),
"INPUT_MODE_RESIZE" => Some(Self::Resize),
"INPUT_MODE_PANE" => Some(Self::Pane),
"INPUT_MODE_TAB" => Some(Self::Tab),
"INPUT_MODE_SCROLL" => Some(Self::Scroll),
"INPUT_MODE_ENTER_SEARCH" =... |
rust_dataset_chunk_517907 | rust_dataset.txt | 517,907 | 512 | (Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum UnblockCondition {
Unspecified = 0,
OnExitSuccess = 1,
OnExitFailure = 2,
OnAnyExit = 3,
}
impl UnblockCondition {
/// String value of the enum field names used in the ProtoBuf definition.
///... |
rust_dataset_chunk_517908 | rust_dataset.txt | 517,908 | 512 | ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESIZE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"RESIZE_TYPE_INCREASE" => Some(Self::Increase),
"RESIZE_TYPE_DECREASE" => Some(Self::Decrease),
_ => N... |
rust_dataset_chunk_517909 | rust_dataset.txt | 517,909 | 512 | "EXIT_REASON_CANNOT_ATTACH" => Some(Self::CannotAttach),
"EXIT_REASON_DISCONNECT" => Some(Self::Disconnect),
"EXIT_REASON_WEB_CLIENTS_FORBIDDEN" => Some(Self::WebClientsForbidden),
"EXIT_REASON_ERROR" => Some(Self::Error),
"EXIT_REASON_CUSTOM_EXIT_STATUS" => S... |
rust_dataset_chunk_517910 | rust_dataset.txt | 517,910 | 512 | = 2,
}
impl SearchDirection {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'sta... |
rust_dataset_chunk_517911 | rust_dataset.txt | 517,911 | 512 | "SEARCH_OPTION_WHOLE_WORD" => Some(Self::WholeWord),
"SEARCH_OPTION_WRAP" => Some(Self::Wrap),
_ => None,
}
}
}
// Additional missing supporting types
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SplitDirection {
... |
rust_dataset_chunk_517912 | rust_dataset.txt | 517,912 | 512 | ExactPanes => "LAYOUT_CONSTRAINT_EXACT_PANES",
LayoutConstraint::NoConstraint => "LAYOUT_CONSTRAINT_NO_CONSTRAINT",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
... |
rust_dataset_chunk_517913 | rust_dataset.txt | 517,913 | 512 | )]
#[repr(i32)]
pub enum OnForceClose {
Unspecified = 0,
Quit = 1,
Detach = 2,
}
impl OnForceClose {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does... |
rust_dataset_chunk_517914 | rust_dataset.txt | 517,914 | 512 | derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum StackDirection {
Unspecified = 0,
Horizontal = 1,
Vertical = 2,
}
impl StackDirection {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are n... |
rust_dataset_chunk_517915 | rust_dataset.txt | 517,915 | 512 | => Some(Self::On),
"WEB_SHARING_OFF" => Some(Self::Off),
"WEB_SHARING_DISABLED" => Some(Self::Disabled),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NestedSessionHandling {
Unspecifi... |
rust_dataset_chunk_517916 | rust_dataset.txt | 517,916 | 512 | /// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
ThemeHue::Unspecified => "THEME_HUE_UNSPECIFIED",
ThemeHue::Dark => "THEME_HUE_DARK",
ThemeHue::Light => "THEME_HUE_LIGHT",
}
... |
rust_dataset_chunk_517917 | rust_dataset.txt | 517,917 | 512 | 6,
}
impl AttentionStatus {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static... |
rust_dataset_chunk_517918 | rust_dataset.txt | 517,918 | 512 | AttentionSource::Notification => "ATTENTION_SOURCE_NOTIFICATION",
AttentionSource::Bell => "ATTENTION_SOURCE_BELL",
AttentionSource::CommandPane => "ATTENTION_SOURCE_COMMAND_PANE",
AttentionSource::ShellCommand => "ATTENTION_SOURCE_SHELL_COMMAND",
AttentionSou... |
rust_dataset_chunk_517919 | rust_dataset.txt | 517,919 | 512 | "BLOCKED_KIND_PERMISSION" => Some(Self::Permission),
"BLOCKED_KIND_QUESTION" => Some(Self::Question),
"BLOCKED_KIND_AUTH" => Some(Self::Auth),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32... |
rust_dataset_chunk_517920 | rust_dataset.txt | 517,920 | 512 | &str) -> ::core::option::Option<Self> {
match value {
"COMMAND_TEXT_SOURCE_SHELL" => Some(Self::Shell),
"COMMAND_TEXT_SOURCE_SCREEN" => Some(Self::Screen),
"COMMAND_TEXT_SOURCE_PROCESS" => Some(Self::Process),
_ => None,
}
}
}
#[derive(Clone, Copy, De... |
rust_dataset_chunk_517921 | rust_dataset.txt | 517,921 | 512 | }
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PREVIEW_ANCHOR_BOTTOM" => Some(Self::Bottom),
"PREVIEW_ANCHOR_LAST_COMMAND_OUTPUT" => Some(Self::LastCommandOut... |
rust_dataset_chunk_517922 | rust_dataset.txt | 517,922 | 512 | AppDoneReply),
#[prost(message, tag="2")]
Refused(super::AppRefusedReply),
#[prost(message, tag="3")]
State(super::AppStateReply),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppOpenWindowRequest {
#[prost(string, op... |
rust_dataset_chunk_517923 | rust_dataset.txt | 517,923 | 512 | #[prost(map="string, string", tag="19")]
pub env: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppToggleTrayIconRequest {
}
#[allow(clippy::derive_partial_eq_... |
rust_dataset_chunk_517924 | rust_dataset.txt | 517,924 | 512 | #[prost(bool, tag="4")]
pub tray_icon: bool,
#[prost(string, optional, tag="5")]
pub focused_session: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag="6")]
pub version: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_... |
rust_dataset_chunk_517925 | rust_dataset.txt | 517,925 | 512 | _QUIT" => Some(Self::Quit),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AppStartupMode {
Unspecified = 0,
Windowed = 1,
Maximized = 2,
Fullscreen = 3,
Remember = 4,
}
impl AppStartupMode {
... |
rust_dataset_chunk_517926 | rust_dataset.txt | 517,926 | 512 | 30, 31, 32, 33, 34, 35, 36, 37, 38")]
pub message: ::core::option::Option<client_to_server_msg::Message>,
}
/// Nested message and enum types in `ClientToServerMsg`.
pub mod client_to_server_msg {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Message {
... |
rust_dataset_chunk_517927 | rust_dataset.txt | 517,927 | 512 | ")]
SoftKeyboardVisibilityChanged(super::SoftKeyboardVisibilityChangedMsg),
#[prost(message, tag="22")]
NestedSessionFrameFromHost(super::NestedSessionFrameFromHostMsg),
#[prost(message, tag="23")]
KittyGraphicsSupport(super::KittyGraphicsSupportMsg),
#[prost(message, tag... |
rust_dataset_chunk_517928 | rust_dataset.txt | 517,928 | 512 | _partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackgroundColorMsg {
#[prost(string, tag="1")]
pub color: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ForegroundColorMsg {
#[prost(s... |
rust_dataset_chunk_517929 | rust_dataset.txt | 517,929 | 512 | derive(Clone, PartialEq, ::prost::Message)]
pub struct ActionMsg {
#[prost(message, optional, tag="1")]
pub action: ::core::option::Option<Action>,
#[prost(uint32, optional, tag="2")]
pub terminal_id: ::core::option::Option<u32>,
#[prost(uint32, optional, tag="3")]
pub client_id: ::core::option:... |
rust_dataset_chunk_517930 | rust_dataset.txt | 517,930 | 512 | 2")]
pub scrollback: ::core::option::Option<u32>,
#[prost(bool, tag="3")]
pub ansi: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeToEventsMsg {
#[prost(string, repeated, tag="1")]
pub event_types: ::prost::alloc::vec::Vec<::p... |
rust_dataset_chunk_517931 | rust_dataset.txt | 517,931 | 512 | ="1")]
pub payload_bytes: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KittyGraphicsSupportMsg {
#[prost(bool, tag="1")]
pub supported: bool,
#[prost(bool, tag="2")]
pub local_media: bool,
}
#[allow(clippy::de... |
rust_dataset_chunk_517932 | rust_dataset.txt | 517,932 | 512 | prost(bool, tag="1")]
pub single_pane: bool,
#[prost(bool, tag="2")]
pub fit: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StructuredRenderSupportMsg {
#[prost(bool, tag="1")]
pub supported: bool,
#[prost(bool, tag="2")]
pub ... |
rust_dataset_chunk_517933 | rust_dataset.txt | 517,933 | 512 | _message {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Message {
#[prost(message, tag="1")]
Attach(super::MirrorAttachMsg),
#[prost(message, tag="2")]
Input(super::MirrorInputMsg),
#[prost(message, tag="3")]
... |
rust_dataset_chunk_517934 | rust_dataset.txt | 517,934 | 512 | tag="5")]
pub focused: bool,
#[prost(bool, tag="6")]
pub resize_allowed: bool,
#[prost(bool, tag="7")]
pub view_only: bool,
#[prost(string, repeated, tag="8")]
pub viewer_sessions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[d... |
rust_dataset_chunk_517935 | rust_dataset.txt | 517,935 | 512 | #[prost(uint64, tag="1")]
pub seq: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MirrorDetachMsg {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MirrorParkMsg {
}
#[allow(clippy::derive_p... |
rust_dataset_chunk_517936 | rust_dataset.txt | 517,936 | 512 | SessionEnding = 2,
Rejected = 3,
VersionMismatch = 4,
PaneNotFound = 5,
ContainsViewer = 6,
}
impl MirrorCloseReason {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the P... |
rust_dataset_chunk_517937 | rust_dataset.txt | 517,937 | 512 | 22, 23, 24, 25, 26, 27, 28")]
pub message: ::core::option::Option<server_to_client_msg::Message>,
}
/// Nested message and enum types in `ServerToClientMsg`.
pub mod server_to_client_msg {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Message {
#... |
rust_dataset_chunk_517938 | rust_dataset.txt | 517,938 | 512 | ThemeModeMsg),
#[prost(message, tag="22")]
TerminalSettings(super::TerminalSettingsMsg),
#[prost(message, tag="23")]
HostProgramStatus(super::HostProgramStatusMsg),
#[prost(message, tag="24")]
SessionAttention(super::SessionAttentionMsg),
#[prost(message, tag="25"... |
rust_dataset_chunk_517939 | rust_dataset.txt | 517,939 | 512 | _without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RenderFrameMsg {
#[prost(bytes="vec", tag="1")]
pub frame: ::prost::alloc::vec::Vec<u8>,
}
/// Empty message
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnblockInputThreadMsg {
}
#[... |
rust_dataset_chunk_517940 | rust_dataset.txt | 517,940 | 512 | ")]
pub pipe_name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub output: ::prost::alloc::string::String,
}
/// Empty message
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryTerminalSizeMsg {
}
/// Empty message
#[allow(clippy::deri... |
rust_dataset_chunk_517941 | rust_dataset.txt | 517,941 | 512 | , optional, tag="1")]
pub pane_id: ::core::option::Option<PaneId>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionEventMsg {
#[prost(string, tag="1")]
pub json: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
... |
rust_dataset_chunk_517942 | rust_dataset.txt | 517,942 | 512 | Message)]
pub struct MobileTabMsg {
#[prost(uint32, tag="1")]
pub position: u32,
#[prost(string, tag="2")]
pub name: ::prost::alloc::string::String,
#[prost(bool, tag="3")]
pub active: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct... |
rust_dataset_chunk_517943 | rust_dataset.txt | 517,943 | 512 | , tag="2")]
pub now_secs: u64,
#[prost(bool, tag="3")]
pub is_welcome_screen: bool,
#[prost(bool, tag="4")]
pub desktop_client_connected: bool,
#[prost(message, optional, tag="5")]
pub desktop_size: ::core::option::Option<MobileSizeMsg>,
#[prost(message, optional, tag="6")]
pub activ... |
rust_dataset_chunk_517944 | rust_dataset.txt | 517,944 | 512 | message and enum types in `NestedSessionMessage`.
pub mod nested_session_message {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Payload {
#[prost(message, tag="1")]
Announce(super::Announce),
#[prost(message, tag="2")]
Focus... |
rust_dataset_chunk_517945 | rust_dataset.txt | 517,945 | 512 | , tag="1")]
pub fullscreen: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Pong {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Bye {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive... |
rust_dataset_chunk_517946 | rust_dataset.txt | 517,946 | 512 | , PartialEq, ::prost::Message)]
pub struct Ping {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GuestModeUpdate {
#[prost(string, tag="1")]
pub mode: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub base_mode: ::prost::alloc::strin... |
rust_dataset_chunk_517947 | rust_dataset.txt | 517,947 | 512 | {
#[prost(message, tag="2")]
Keybinds(super::GuestKeybinds),
#[prost(enumeration="super::GuestKeybindsError", tag="3")]
Error(i32),
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NestedCapability {
Unspecified ... |
rust_dataset_chunk_517948 | rust_dataset.txt | 517,948 | 512 | _DIRECTION_UNSPECIFIED",
NestedDirection::Left => "NESTED_DIRECTION_LEFT",
NestedDirection::Right => "NESTED_DIRECTION_RIGHT",
NestedDirection::Up => "NESTED_DIRECTION_UP",
NestedDirection::Down => "NESTED_DIRECTION_DOWN",
}
}
/// Creates an enum from fiel... |
rust_dataset_chunk_517949 | rust_dataset.txt | 517,949 | 512 | ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GUEST_KEYBINDS_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
"GUEST_KEYBINDS_ERROR_NOT_NESTED" => Some(Self::NotNested),
"GUEST_KEYBINDS_ERROR_UNSUPPORTED" => Some(Se... |
rust_dataset_chunk_517950 | rust_dataset.txt | 517,950 | 512 | Msg {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WebServerResponse {
#[prost(oneof="web_server_response::Response", tags="1")]
pub response: ::core::option::Option<web_server_response::Response>,
}
/// Nested message and enum types in `WebServerResp... |
rust_dataset_chunk_517951 | rust_dataset.txt | 517,951 | 512 | Option<usize>,
pub cols: Option<usize>,
pub options: Option<crate::input::options::Options>,
pub token: Option<String>,
pub remember: bool,
pub forget: bool,
pub ca_cert: Option<PathBuf>,
pub insecure: bool,
pub env: BTreeMap<String, String>,
}
impl OpenWindowRequest {
pub fn remot... |
rust_dataset_chunk_517952 | rust_dataset.txt | 517,952 | 512 | Path) -> Result<AppState, String> {
match send_app_request_to(socket, &AppRequest::Describe)? {
AppReply::State(state) => Ok(state),
AppReply::Refused(reason) => Err(reason),
AppReply::Done => Err("The app did not describe itself".to_owned()),
}
}
pub fn write_request(writer: &mut impl ... |
rust_dataset_chunk_517953 | rust_dataset.txt | 517,953 | 512 | ) -> Result<AppReply, String> {
send_app_request_to(&crate::consts::app_control_socket(), request)
}
pub fn send_app_request_to(socket: &Path, request: &AppRequest) -> Result<AppReply, String> {
use interprocess::local_socket::traits::Stream as _;
#[cfg(windows)]
let (mut stream, mut reply_stream) =
... |
rust_dataset_chunk_517954 | rust_dataset.txt | 517,954 | 512 | proto::AppPopupView::Unspecified => None,
}
}
fn popup_view_value(view: Option<PopupView>) -> i32 {
view.map(proto::AppPopupView::from)
.unwrap_or(proto::AppPopupView::Unspecified) as i32
}
fn startup_mode_value(mode: Option<StartupMode>) -> i32 {
(match mode {
None => proto::AppStartupMo... |
rust_dataset_chunk_517955 | rust_dataset.txt | 517,955 | 512 | request
.ca_cert
.as_ref()
.map(|path| path.display().to_string()),
insecure: request.insecure,
env: request
.env
.iter()
.map(|(name, value)| (name.clone(), value.clone()))
.collect(... |
rust_dataset_chunk_517956 | rust_dataset.txt | 517,956 | 512 | TogglePanel { view, token } => {
Request::TogglePanel(proto::AppTogglePanelRequest {
view: popup_view_value(Some(*view)),
token: token.clone(),
})
},
AppRequest::Ping => Request::Ping(proto::AppPingRequest {}),
A... |
rust_dataset_chunk_517957 | rust_dataset.txt | 517,957 | 512 | (),
tray_icon: state.tray_icon,
focused_session: state.focused_session.clone(),
version: state.version.clone(),
}),
};
proto::AppControlReply { reply: Some(reply) }
}
}
impl TryFrom<proto::AppControlReply> for AppReply {
type Error = R... |
rust_dataset_chunk_517958 | rust_dataset.txt | 517,958 | 512 | options: Some(crate::input::options::Options {
pane_frames: Some(false),
..Default::default()
}),
token: Some("secret".to_owned()),
remember: true,
forget: true,
ca_cert: Some(PathBuf::from("/etc/ca.... |
rust_dataset_chunk_517959 | rust_dataset.txt | 517,959 | 512 | assert!(!is_older_app(Some("0.47.0"), "0.46.2"));
assert!(!is_older_app(Some("not a version"), "0.46.2"));
}
#[test]
fn a_closed_connection_or_an_oversized_message_is_an_error() {
assert_eq!(read_reply(&mut &b""[..]), Err(ReadError::Closed));
assert_eq!(
read_reply(&mut... |
rust_dataset_chunk_517960 | rust_dataset.txt | 517,960 | 512 | = 42;
let request = proto::AppControlRequest {
request: Some(proto::app_control_request::Request::OpenWindow(open)),
};
match AppRequest::try_from(request).unwrap() {
AppRequest::OpenWindow(open) => assert_eq!(open.startup_mode, None),
other => panic!("{:?}",... |
rust_dataset_chunk_517961 | rust_dataset.txt | 517,961 | 512 | ()
} else {
self.symbol()
}
}
pub fn as_str(&self) -> &'static str {
match self {
AttentionStatus::NeedsYou => "needs_you",
AttentionStatus::Failed => "failed",
AttentionStatus::Done => "done",
AttentionStatus::Quiet => "quiet",... |
rust_dataset_chunk_517962 | rust_dataset.txt | 517,962 | 512 | Option<Self> {
Some(match value {
"program_status" => AttentionSource::ProgramStatus,
"notification" => AttentionSource::Notification,
"bell" => AttentionSource::Bell,
"command_pane" => AttentionSource::CommandPane,
"shell_command" => AttentionSource:... |
rust_dataset_chunk_517963 | rust_dataset.txt | 517,963 | 512 | None,
}
}
pub fn attention_status(&self) -> AttentionStatus {
match self {
ProgramState::Idle => AttentionStatus::Idle,
ProgramState::Working => AttentionStatus::Working,
ProgramState::Done => AttentionStatus::Done,
ProgramState::Blocked => Attent... |
rust_dataset_chunk_517964 | rust_dataset.txt | 517,964 | 512 | CommandResult::Failed => "failed",
CommandResult::Unknown => "unknown",
}
}
pub fn from_str(value: &str) -> Option<Self> {
match value {
"succeeded" => Some(CommandResult::Succeeded),
"failed" => Some(CommandResult::Failed),
"unknown" =... |
rust_dataset_chunk_517965 | rust_dataset.txt | 517,965 | 512 | !(self, CommandPhase::AtPrompt | CommandPhase::Typing)
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum CwdSource {
Osc7,
KittyShellCwd,
ConEmu,
ITerm2,
Vscode,
Poll,
}
impl CwdSource {
pub fn as_str(&self) -> &'static str {
match self {
... |
rust_dataset_chunk_517966 | rust_dataset.txt | 517,966 | 512 | Option<u8>,
pub app: Option<String>,
pub title: Option<String>,
pub body: Option<String>,
pub exit_code: Option<i32>,
pub duration_ms: Option<u64>,
pub command: Option<CommandText>,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum MuteScope {
Pane,
... |
rust_dataset_chunk_517967 | rust_dataset.txt | 517,967 | 512 | Some(AttentionSource::Watch)
) {
self.text = strip_command_from_text(&self.text);
}
self
}
}
pub fn strip_command_from_text(text: &str) -> String {
match text.split_once(": ") {
Some((head, _)) => head.to_owned(),
None => text.to_owned(),
}
}
#[derive(D... |
rust_dataset_chunk_517968 | rust_dataset.txt | 517,968 | 512 | pub attention: PaneAttention,
}
impl AttentionItem {
pub fn label(&self) -> String {
let pane = sanitize_display_text(&self.pane_title);
let tab = sanitize_display_text(&self.tab_name);
let text = sanitize_display_text(&self.attention.text);
let place = if tab.is_empty() {
... |
rust_dataset_chunk_517969 | rust_dataset.txt | 517,969 | 512 | GlobalAttentionItem {
pub fn is_counted(&self) -> bool {
!self.item.attention.is_muted() && self.item.attention.status.is_counted()
}
pub fn is_muted(&self) -> bool {
self.item.attention.is_muted()
}
pub fn is_activity(&self) -> bool {
!self.is_muted()
&& matches... |
rust_dataset_chunk_517970 | rust_dataset.txt | 517,970 | 512 | AttentionCounts::default();
let mut items = vec![];
for session in &sessions {
counts.merge(&session.attention.counts);
for item in &session.attention.items {
items.push(GlobalAttentionItem {
session: session.name.clone(),
... |
rust_dataset_chunk_517971 | rust_dataset.txt | 517,971 | 512 | .iter().filter(|i| i.is_muted()).collect()
}
pub fn find(&self, session: &str, pane_id: &PaneId) -> Option<&GlobalAttentionItem> {
self.items.iter().find(|i| i.is_same_pane(session, pane_id))
}
pub fn next_counted_after(
&self,
session: &str,
pane_id: Option<&PaneId>,
... |
rust_dataset_chunk_517972 | rust_dataset.txt | 517,972 | 512 | , HOST_STATUS_APP);
if let Some(kind) = &self.kind {
body.push_str(&format!(":kind={}", kind));
}
if let Some(progress) = self.progress {
body.push_str(&format!(":progress={}", progress.min(100)));
}
let msg = sanitize_display_text(&self.msg);
let ... |
rust_dataset_chunk_517973 | rust_dataset.txt | 517,973 | 512 | AttentionStatus::NeedsYou,
AttentionStatus::Working,
AttentionStatus::NewOutput,
AttentionStatus::Failed,
AttentionStatus::Quiet,
];
statuses.sort();
statuses.reverse();
assert_eq!(
statuses,
vec![
... |
rust_dataset_chunk_517974 | rust_dataset.txt | 517,974 | 512 | <AttentionItem> = items
.into_iter()
.map(|(id, status, since_ms, muted)| {
let attention = PaneAttention {
status,
source: Some(AttentionSource::ShellCommand),
text: format!("exited {}: secret", id),
... |
rust_dataset_chunk_517975 | rust_dataset.txt | 517,975 | 512 | Id::Terminal(1)),
("here".to_owned(), PaneId::Terminal(3)),
("api".to_owned(), PaneId::Terminal(2)),
]
);
assert_eq!(global.counted_items().len(), 3);
assert_eq!(global.activity_items().len(), 1);
assert_eq!(global.muted_items().len(), 1);
... |
rust_dataset_chunk_517976 | rust_dataset.txt | 517,976 | 512 | attention.text,
"exited 1"
);
}
#[test]
fn stripping_command_text_keeps_the_head() {
let attention = PaneAttention {
status: AttentionStatus::Failed,
source: Some(AttentionSource::ShellCommand),
text: "exited 1: cargo build".to_owned(),
... |
rust_dataset_chunk_517977 | rust_dataset.txt | 517,977 | 512 | task_local! {
/// A key to some task local storage that holds a representation of the task's call
/// stack in the form of an [`ErrorContext`].
pub static ASYNCOPENCALLS: RefCell<ErrorContext>;
}
--- FILE: zellij/zellij-utils/src/client_server_contract/mod.rs ---
include!(concat!(
env!("CARGO_MANIFEST... |
rust_dataset_chunk_517978 | rust_dataset.txt | 517,978 | 512 | value_parser = clap::builder::RangedU64ValueParser::<usize>::new().range(1..))]
pub max_panes: Option<usize>,
/// Change where zellij looks for plugins
#[clap(long, value_parser, overrides_with = "data_dir")]
pub data_dir: Option<PathBuf>,
/// Run server listening at the specified socket path
... |
rust_dataset_chunk_517979 | rust_dataset.txt | 517,979 | 512 | pub debug: bool,
}
impl CliArgs {
pub fn is_setup_clean(&self) -> bool {
if let Some(Command::Setup(ref setup)) = &self.command {
if setup.clean {
return true;
}
}
false
}
pub fn options(&self) -> Option<Options> {
if let Some(Comm... |
rust_dataset_chunk_517980 | rust_dataset.txt | 517,980 | 512 | ]
Subscribe(SubscribeCli),
#[clap(
about = "Stream structured session events (pane, tab, focus, mode, client and session changes) as JSON lines",
override_usage("zellij [--session <OTHER SESSION NAME>] events [OPTIONS]")
)]
Events(EventsCli),
#[clap(
about = "Show a UI elem... |
rust_dataset_chunk_517981 | rust_dataset.txt | 517,981 | 512 | ap(
long,
conflicts_with_all(&["at_mouse", "at_center"]),
help = "Open the popup just below your cursor, in the pane you are focused on (e.g. --at-cursor)"
)]
pub at_cursor: bool,
#[clap(
long,
conflicts_with_all(&["at_mouse", "at_cursor"]),
help = "Open the ... |
rust_dataset_chunk_517982 | rust_dataset.txt | 517,982 | 512 | Cancel && git push --force
zellij prompt confirm \"Deploy?\" --title Production --timeout 10s --default no"
)]
Confirm {
#[clap(help = "The question (e.g. \"Force push?\")")]
message: Option<String>,
#[clap(long, help = "Label of the confirming button (e.g. --yes Push)")]
yes:... |
rust_dataset_chunk_517983 | rust_dataset.txt | 517,983 | 512 | long,
allow_hyphen_values = true,
help = "An item ticked in advance (e.g. --selected b)"
)]
selected: Vec<String>,
#[clap(flatten)]
answer: PromptAnswerArgs,
},
#[clap(
about = "Ask for a line of text (e.g. zellij prompt input \"Commit message\" -... |
rust_dataset_chunk_517984 | rust_dataset.txt | 517,984 | 512 | (long, help = "Step used by the arrow keys (e.g. --step 10)")]
step: Option<i64>,
#[clap(flatten)]
answer: PromptAnswerArgs,
},
#[clap(
about = "Ask for on or off; prints true or false (e.g. zellij prompt toggle \"Enable CI\" --default on)",
after_help = "Examples:\n zel... |
rust_dataset_chunk_517985 | rust_dataset.txt | 517,985 | 512 | in JSON and print one JSON object (e.g. zellij prompt form --spec form.json)",
after_help = "Examples:\n echo '{\"title\":\"New project\",\"fields\":[{\"id\":\"name\",\"type\":\"input\",\"label\":\"Name\",\"required\":true},{\"id\":\"ci\",\"type\":\"toggle\",\"label\":\"Use CI\",\"default\":true}]}' | zellij ... |
rust_dataset_chunk_517986 | rust_dataset.txt | 517,986 | 512 | ElementCli::Confirm { answer, .. }
| PromptElementCli::Choose { answer, .. }
| PromptElementCli::Input { answer, .. }
| PromptElementCli::Number { answer, .. }
| PromptElementCli::Toggle { answer, .. }
| PromptElementCli::Select { answer, .. }
| Pr... |
rust_dataset_chunk_517987 | rust_dataset.txt | 517,987 | 512 | dead session, immediately run all its commands on startup
#[clap(short, long)]
pub force_run_commands: bool,
/// Authentication token for remote sessions
#[clap(short('t'), long, value_parser)]
pub token: Option<String>,
/// Save session for automatic re-authentication (4 weeks)
#[clap(sh... |
rust_dataset_chunk_517988 | rust_dataset.txt | 517,988 | 512 | , hide = true)]
pub rows: Option<usize>,
/// Columns to advertise while headless
#[clap(long, hide = true)]
pub cols: Option<usize>,
/// Character cell width in pixels to advertise while headless
#[clap(long, default_value_t = 10, hide = true)]
pub cell_width: usize,
/// Character cel... |
rust_dataset_chunk_517989 | rust_dataset.txt | 517,989 | 512 | ", "headless", "initial_command", "background"],
help = "Run this command (and every argument after it) as the first pane, close the pane when it exits, and wait for it, exiting with its exit code (as terminal emulators do)"
)]
pub execute: Vec<String>,
#[clap(
long,
value_name = "D... |
rust_dataset_chunk_517990 | rust_dataset.txt | 517,990 | 512 | _value = "0",
num_args(0..=1)
)]
pub scrollback: Option<usize>,
/// Output format
#[clap(short, long, default_value = "raw", value_enum)]
pub format: SubscribeFormat,
/// Preserve ANSI styling in the output
#[clap(long)]
pub ansi: bool,
}
#[derive(Debug, Clone, Serialize, Dese... |
rust_dataset_chunk_517991 | rust_dataset.txt | 517,991 | 512 | ,
conflicts_with_all(&["stop", "status", "create_token", "revoke_token", "revoke_all_tokens"]),
display_order = 5
)]
pub daemonize: bool,
/// Timeout in seconds waiting for the server to start (default: 10).
/// Only used on Windows where the daemonized server is polled via TCP.
/// ... |
rust_dataset_chunk_517992 | rust_dataset.txt | 517,992 | 512 | display_order = 14
)]
pub port: Option<u16>,
/// The path to the SSL certificate (required if not listening on 127.0.0.1)
#[clap(
long,
value_parser,
conflicts_with_all(&["stop", "status", "create_token", "revoke_token", "revoke_all_tokens"]),
display_order = 15
)]
... |
rust_dataset_chunk_517993 | rust_dataset.txt | 517,993 | 512 | ")]
Watch {
/// Name of the session to watch
#[clap(value_parser)]
session_name: Option<String>,
},
/// Kill a specific session
#[clap(visible_alias = "k")]
KillSession {
/// Name of target session
#[clap(value_parser)]
target_session: Option<String>,... |
rust_dataset_chunk_517994 | rust_dataset.txt | 517,994 | 512 | Option<String>,
/// Close the pane immediately when its command exits
#[clap(short, long)]
close_on_exit: bool,
/// Start the command suspended, only running after you first presses ENTER
#[clap(short, long)]
start_suspended: bool,
#[clap(
long,
... |
rust_dataset_chunk_517995 | rust_dataset.txt | 517,995 | 512 | its pane has been closed
#[clap(
long,
conflicts_with("blocking"),
conflicts_with("block_until_exit_success"),
conflicts_with("block_until_exit_failure")
)]
block_until_exit: bool,
/// if set, will open the pane near the current one rather... |
rust_dataset_chunk_517996 | rust_dataset.txt | 517,996 | 512 | %)
#[clap(short, long, requires("floating"))]
x: Option<String>,
/// The y coordinates if the pane is floating as a bare integer (eg. 1) or percent (eg. 10%)
#[clap(short, long, requires("floating"))]
y: Option<String>,
/// The width if the pane is floating as a bare inte... |
rust_dataset_chunk_517997 | rust_dataset.txt | 517,997 | 512 | replaced pane instead of suspending it (only effective with --in-place)
#[clap(long, requires("in_place"))]
close_replaced_pane: bool,
/// Open the new pane in floating mode
#[clap(short, long)]
floating: bool,
/// Change the working directory of the editor
#[c... |
rust_dataset_chunk_517998 | rust_dataset.txt | 517,998 | 512 | },
/// Send data to one or more plugins, launch them if they are not running.
#[clap(override_usage(
r#"
zellij pipe [OPTIONS] [--] <PAYLOAD>
* Send data to a specific plugin:
zellij pipe --plugin file:/path/to/my/plugin.wasm --name my_pipe_name -- my_arbitrary_data
* To all running plugins (that are lis... |
rust_dataset_chunk_517999 | rust_dataset.txt | 517,999 | 512 | _2 or 3 (equivalent to terminal_3)
#[clap(short, long, value_parser)]
pane_id: Option<String>,
},
/// Paste text to the terminal (using bracketed paste mode).
Paste {
chars: String,
/// The pane_id of the pane, eg. terminal_1, plugin_2 or 3 (equivalent to terminal_3)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.