This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM fedora:37 | |
RUN dnf install -y 'dnf-command(copr)' && \ | |
dnf copr enable -y agriffis/neovim-nightly && \ | |
dnf install -y neovim | |
CMD nvim --listen 0.0.0.0:8080 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] | |
#[serde(rename_all="snake_case")] | |
pub enum State { | |
Pending, | |
Sending, | |
Sent, | |
Failed, | |
} | |
impl fmt::Display for State { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reflection; | |
using Newtonsoft.Json.Converters; | |
public class StringEnumConverter<TEnum> : StringEnumConverter where TEnum : struct, IConvertible | |
{ | |
public override bool CanConvert(Type objectType) | |
{ | |
Type t = Nullable.GetUnderlyingType(objectType) ?? objectType; | |
return t.IsEnum && t == typeof(TEnum); | |
} |