MCPcopy Create free account

hub / github.com/Reim-developer/magical_rs / functions

Functions68 in github.com/Reim-developer/magical_rs

↓ 10 callersFunctionmatch_types_custom
(bytes: &[u8], rules: &[MagicCustom<K>], fallback: K)
src/magical/magic_custom.rs:719
↓ 7 callersFunctionread_file_header
(file_path: &str, max_bytes: usize)
src/magical/bytes_read.rs:144
↓ 6 callersMethodmatches
(&self, bytes: &[u8])
src/magical/dyn_magic.rs:83
↓ 6 callersFunctionwith_bytes_read
()
src/magical/bytes_read.rs:83
↓ 2 callersMethodmatches
(&self, bytes: &[u8])
src/magical/async_dyn_magic.rs:42
↓ 2 callersFunctionmax_bytes
(offsets: &[usize], signature: &[u8])
src/magical/bytes_read.rs:5
↓ 1 callersFunctiondetect_iso
* A simple function to detect the ISO file format */
examples/normal_usage/src/main.rs:40
↓ 1 callersFunctiondetect_png
* A simple example function to detect 'PNG' file. */
examples/normal_usage/src/main.rs:7
↓ 1 callersMethodkind
(&self)
src/magical/dyn_magic.rs:93
↓ 1 callersMethodkind
(&self)
src/magical/async_dyn_magic.rs:58
↓ 1 callersMethodkind_arc
Returns a reference to the stored [`AsyncDynMagic::kind`], as `Arc<dyn Any + Send + Sync>`
src/magical/async_dyn_magic.rs:48
↓ 1 callersFunctionmagic_async_detect
* Of course, to use this feature, you need an async function. */
examples/async_dyn_magic/src/main.rs:22
↓ 1 callersFunctionmagic_custom_all
* But in this function, just one condition return false. * All will return fallback. */
examples/magic_custom/src/v_2_0_0/magic_custom_macro.rs:56
↓ 1 callersFunctionmagic_custom_any
* With this function, as you can see, even though it seems like * there is a condition that `is_not_shoujo` return false. * we still get the result `S
examples/magic_custom/src/v_2_0_0/magic_custom_macro.rs:33
↓ 1 callersFunctionmatch_dyn_types
Find the first matching rule and returns a reference to its `kind` The returned `&dyn Any` has the same life time as the `rules` slice.
src/magical/dyn_magic.rs:119
↓ 1 callersFunctionmatch_dyn_types
(bytes: &[u8], rules: &'a [AsyncDynMagic])
src/magical/async_dyn_magic.rs:81
↓ 1 callersFunctionmatch_dyn_types_all
(bytes: &[u8], rules: &'a [DynMagicCustom])
src/magical/dyn_magic.rs:139
↓ 1 callersMethodmatches_custom
(&self, bytes: &[u8])
src/magical/magic_custom.rs:589
↓ 1 callersFunctionmy_custom_magic
* Simple function to detect file with your customize * rule */
examples/magic_custom/src/main.rs:25
↓ 1 callersFunctionmy_custom_magic_with_fn
* Simple function to detect file with your customize rule. * But this time. We'll add a litle magic to it. */
examples/magic_custom/src/main.rs:64
↓ 1 callersFunctionmy_detect_rule
* Here you can write a function, where you can do whatever condition * you want as long as you make sure it a closure * that returns a `bool` & with a
examples/dyn_magic/src/main.rs:16
↓ 1 callersFunctionmy_magic_detect
* Finnaly. We'll use magic to make things * neater */
examples/magic_custom/src/main.rs:94
Function__from_ref
(r: &T)
src/magical/magic_custom.rs:582
Functiondetect_custom_file
(file_bytes: &'static [u8])
examples/dyn_magic/src/main.rs:22
Functiondetect_mikoto_chan
* This is a magic function for us * to recognize a cute girl Mikoto-chan. */
examples/magic_custom/src/main.rs:69
Functionfind_shoujo_girl
(bytes: &[u8])
tests/magic_custom.rs:71
Functionis_not_shoujo
(bytes: &[u8])
examples/magic_custom/src/v_2_0_0/magic_custom_macro.rs:24
Functionis_not_shoujo_girl
(data: *const ())
tests/unsafe.rs:65
Functionis_shoujo
(bytes: &[u8])
examples/magic_custom/src/v_2_0_0/magic_custom_macro.rs:20
Functionis_shoujo_girl
(bytes: &[u8])
tests/magic_custom.rs:40
Functionis_shoujo_girl
(data: *const ())
tests/unsafe.rs:14
Functionis_shoujo_girl
(data: *const ())
examples/unsafe_context/src/main.rs:21
Functionis_webp
(bytes: &[u8])
src/magical/ext_fn/webp.rs:5
Methodkind_downcast_ref
(&self)
src/magical/dyn_magic.rs:101
Methodkind_downcast_ref
(&self)
src/magical/async_dyn_magic.rs:66
Functionmain
()
examples/magic_custom/src/main.rs:137
Functionmain
()
examples/async_dyn_magic/src/main.rs:70
Functionmain
()
examples/unsafe_context/src/main.rs:38
Functionmain
()
examples/dyn_magic/src/main.rs:50
Functionmain
()
examples/normal_usage/src/main.rs:57
Functionmatch_dyn_types_all
Returns all matching [`AsyncDynMagic::kind`] This is the asynchronous version of function `match_dyn_types_all` in `DynMagicCustom`
src/magical/async_dyn_magic.rs:108
Functionmatch_dyn_types_as
( bytes: &[u8], rules: &'a [DynMagicCustom], )
src/magical/dyn_magic.rs:129
Functionmatch_dyn_types_as
Shorthand: returns the first matching [`AsyncDynMagic::kind`] downcasted to `&T` This is the asynchronous version of function `match_dyn_types_as` in
src/magical/async_dyn_magic.rs:96
Methodmatch_types
(bytes: &[u8])
src/magical/magic.rs:128
Methodmatch_with_custom_max_read
(bytes: &[u8], allowed_max_read: usize)
src/magical/magic.rs:274
Methodmatch_with_max_read_rule
(bytes: &[u8], allowed_max_read: usize)
src/magical/magic.rs:209
Methodmatches
(&self, bytes: &[u8])
src/magical/signatures.rs:89
Methodmax_bytes_read
(&self)
src/magical/dyn_magic.rs:109
Methodmax_bytes_read
(&self)
src/magical/async_dyn_magic.rs:74
Methodnew
(matcher: F, kind: K, max_bytes_read: usize)
src/magical/dyn_magic.rs:69
Methodnew
(matcher: F, kind: K, max_bytes_read: usize)
src/magical/async_dyn_magic.rs:27
Functiontest_all_unsafe_fn
()
tests/unsafe.rs:95
Functiontest_any_unsafe_fn
()
tests/unsafe.rs:45
Functiontest_class_detect
()
tests/test.rs:37
Functiontest_dyn_detect_file
()
tests/dyn.rs:56
Functiontest_dyn_magic_downcast
()
tests/dyn.rs:15
Functiontest_dyn_magic_matches
()
tests/dyn.rs:3
Functiontest_iso_detect
()
tests/test.rs:2
Functiontest_match_dyn_types_all
()
tests/dyn.rs:29
Functiontest_match_types_custom
()
tests/magic_custom.rs:2
Functiontest_png_detect
()
tests/test.rs:22
Functiontest_read_file_header
()
src/magical/bytes_read.rs:166
Functiontest_unsafe_magic_custom
()
tests/unsafe.rs:3
Functiontest_webp_detect
()
tests/test.rs:55
Functiontest_with_all_matches
()
tests/magic_custom.rs:98
Functiontest_with_any_matches
()
tests/magic_custom.rs:60
Functiontest_with_custom_rules
()
tests/magic_custom.rs:30
Functionwrong_shoujo_girl
(bytes: &[u8])
tests/magic_custom.rs:75