bitfl0wer
f9c3f55d95
Remove channel_id argument from modify. WHY WAS IT THERE TO BEGIN WITH LOL
2023-08-13 15:54:25 +02:00
bitfl0wer
20cd457c04
Change tests to deal with `Arc<RwLock<T>>`'s
2023-08-13 15:54:07 +02:00
bitfl0wer
73cc139e78
Moddify observe to still store T internally
2023-08-13 15:52:16 +02:00
fowb
29d4ef23a2
Change T: Updateable to Arc<RwLock<T>>
2023-08-12 22:40:40 +02:00
fowb
63a4141bde
Add fixme comment
2023-08-12 22:40:07 +02:00
fowb
a0c9f6fb14
Change observe() to take Arc<RwLock<T>>
2023-08-12 19:47:11 +02:00
fowb
ff47965e99
Change Mutex<T> to RwLock<T>
2023-08-12 19:31:31 +02:00
fowb
7071de8412
Merge branch 'main' into enhancement/improved-auto-updating-structs
2023-08-12 19:04:25 +02:00
kozabrada123
e0d7df417c
Fix trailing /s ( #180 )
2023-08-12 16:48:33 +02:00
kozabrada123
1801d22273
Minor snowflake updates ( #179 )
...
* Make snowflake fully public
* Simple into for snowflake
2023-08-07 20:34:58 +02:00
Flori
2d7fe96eda
Fix unwrap panic on trying to access rate limits ( #178 )
2023-08-07 14:56:32 +02:00
bitfl0wer
07818b2cd6
Fix unwrap panic on trying to access rate limits
2023-08-07 14:56:10 +02:00
kozabrada123
1cc29540d0
Minor improvements to message events ( #177 )
2023-08-07 14:15:23 +02:00
Flori
1aa8bcc6d2
Components and Composites ( #175 )
...
As described in #165 , Gateway induced changes of entity structs do not
get propagated to other structs holding the "same" object which got
updated. This is bad because it means that structs still hold
potentially outdated info.
My proposed solution is to create components and composites. A component
is an object with information which is supposed to be the same in at
least 2 structs, such as a Channel object ("channels" field in Guild
struct and lone Channel object for example). These components should be
shared instead of cloned, to make sure that an update to this shared
structs fields is reflected everywhere the struct is being used.
We can do this by using `Arc<Mutex<T>>`. Mutex can be the
std::sync::Mutex, as long as locks on the components themselves are not
being held across .await points. ~~This draft is not yet finished, but~~
all instances of components in composite entity structs have been
replaced with their `Arc<Mutex<T>>` counterparts already.
2023-08-04 15:55:47 +02:00
Flori
1bdcc198da
Merge pull request #1 from kozabrada123/prototype/component-and-composites
...
Re-add derives to structs where possible
2023-08-04 15:48:34 +02:00
kozabrada123
47246cabad
Re-add derives to structs where possible
2023-08-04 15:33:46 +02:00
bitfl0wer
98188eadc4
Fix deadlock on test_get_mutual_relationships
2023-08-04 11:42:28 +02:00
bitfl0wer
420c2f7727
Fix deadlock in test_get_relationships
2023-08-04 11:34:03 +02:00
bitfl0wer
fb792f8356
Integrate component behaviour everywhere
2023-08-04 11:19:23 +02:00
bitfl0wer
94eac6eba9
Make components be Arc<Mutex<T>>
2023-08-02 23:08:53 +02:00
bitfl0wer
a36d691fea
Add PartialEq, Eq, Hash to Enums
2023-08-02 20:23:50 +02:00
bitfl0wer
9f69f57635
Start component-izing entities, remove PartialEq wherever needed (because PartialEq isn't implemented for Mutex)
2023-08-02 20:18:16 +02:00
bitfl0wer
917f1cfb0d
Add rc feature to serde
2023-08-02 20:17:36 +02:00
bitfl0wer
2739a7479b
Exclude all Target dirs
2023-08-01 21:21:00 +02:00
Flori
9804c0f346
Doc comment improvements ( #171 )
...
This pr is focused on improving doc comments, along with some minor
changes
Changes (up to now):
- Make all doc comments use `///`
- Fix links (links that aren't actually links, links such as
`[https://discord.com ](https://discord.com )` -> `<https://discord.com >`)
- Remove unnecessary docs that only restate what the function signature
already says
- Document some previously undocumented types
- Change `Result<_, crate::errors::ChorusError>` to `ChorusResult<_>`
- Rename `create_guild_invite` to `create_channel_invite` (See the
surrounding code and the endpoint used)
Should close #129
2023-07-31 22:37:23 +02:00
kozabrada123
c0bc2ee9e2
Fix missing references to the best of my ability
2023-07-31 10:28:18 +02:00
kozabrada123
261ae6eb4a
Goof
2023-07-31 10:07:56 +02:00
kozabrada123
60393a5686
Docs
2023-07-31 10:01:25 +02:00
kozabrada123
7f65f9ca81
Merge branch 'main' into fix/doc-improvements
2023-07-31 09:13:33 +02:00
Flori
34c77169aa
Changed struct reaction ( #173 )
...
Fixes #172
2023-07-30 20:35:32 +02:00
Flori
2249ae65d7
Remove newline
2023-07-30 20:35:02 +02:00
Vivien
92bc958cf1
update of reaction struct
2023-07-30 20:27:13 +02:00
Vivien
50538eb15d
change signed to unsigned integer
2023-07-30 20:23:12 +02:00
kozabrada123
8b76936050
Fix the test
2023-07-30 09:10:32 +02:00
kozabrada123
1ce9bf08cd
Guilds + Channels
2023-07-30 09:04:31 +02:00
kozabrada123
ba25cab1e9
Fix broken links
2023-07-30 08:31:12 +02:00
kozabrada123
b72ebf36ed
Documemtaiom
2023-07-30 08:26:26 +02:00
kozabrada123
d50e969a07
Document a small bit of attachment
2023-07-29 18:12:57 +02:00
kozabrada123
590afc8c9d
Permissions with code blocks
2023-07-29 18:12:57 +02:00
kozabrada123
7637051733
Update src/types/utils/rights.rs
...
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-07-29 16:07:06 +00:00
kozabrada123
0f300cfb20
Update src/types/utils/snowflake.rs
...
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-07-29 16:06:49 +00:00
kozabrada123
e64233e6d8
Update src/types/utils/rights.rs
...
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-07-29 16:06:35 +00:00
kozabrada123
84ada8b94a
Update src/types/utils/rights.rs
...
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-07-29 16:05:27 +00:00
kozabrada123
b172e5910d
Update src/types/utils/rights.rs
...
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-07-29 16:04:49 +00:00
kozabrada123
552032a61e
Capitalise docs
...
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-07-29 16:04:08 +00:00
kozabrada123
e6dc44754c
Forgot this since had the lint on my local copy
2023-07-29 11:45:25 +02:00
kozabrada123
b632958b0f
Document some flags
2023-07-29 11:26:10 +02:00
kozabrada123
ede965411e
Minor doc changes
2023-07-29 11:26:00 +02:00
kozabrada123
1e81a2682f
Document rights
2023-07-29 11:00:28 +02:00
kozabrada123
83d4ffc4e8
Moar docs
2023-07-29 10:23:04 +02:00