The goal of this article is to explain the Rust Pin
higher order type by exploring how Rust
handles self-referential structs. Rust works best when data is modelled without cycles and there
is no way to express self-referential structs directly, so creating and manipulating these kinds of
struct can be a bit tricky.
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
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAyL70QmF8RlGbSig3vh9LDXY2RkkKmvBhWAMyn/Nd4S [email protected] |
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
Supported URLs : | |
/me | |
/user/id | |
/historyShip/id | |
/historyHero/id | |
/group/id | |
/curShip | |
/curHero |
I hereby claim:
- I am demurgos on github.
- I am demurgos (https://keybase.io/demurgos) on keybase.
- I have a public key ASCbE4ATLqXn-zKVANUHjJoqzUbDVJbyWxdCMeC26V-LlAo
To claim this, I am signing this object:
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
[package] | |
name = "pgrepro" | |
version = "0.1.0" | |
authors = ["Charles Samborski <[email protected]>"] | |
edition = "2018" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
futures-util = "0.3.13" |
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
use std::sync::Arc; | |
use crate::core::{Get, UuidGenerator}; | |
use crate::clock::Clock; | |
use crate::user::SimpleUserService; | |
#[derive(Clone)] | |
pub struct Api(()); | |
pub trait ApiLike: Clone + Sized {} |
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
use std::sync::Arc; | |
use crate::core::{Provider, UuidGenerator}; | |
use crate::clock::Clock; | |
use crate::user::SimpleUserService; | |
#[derive(Clone)] | |
pub struct Api(()); | |
pub trait ApiLike: Clone + Sized {} |
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
// ==UserScript== | |
// @name HammerfestHeader | |
// @namespace hammerfest.fr | |
// @description Choix de la banniere Hammerfest | |
// @version 2 | |
// @include http://www.hammerfest.fr/* | |
// @match http://www.hammerfest.fr/* | |
// ==/UserScript== | |
//Cacher les sites amis pendant une partie |
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
interface LinearRgb { | |
r: number; | |
g: number; | |
b: number; | |
} | |
interface Srgb { | |
r: number; | |
g: number; |
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
--A--------------------------- | |
[a---------------) | |
+ | |
--B--------------------------- | |
[b-----) | |
+ | |
--C--------------------------- | |
[c--------------) |
NewerOlder