MCPcopy Index your code

hub / github.com/fadeevab/design-patterns-rust / functions

Functions277 in github.com/fadeevab/design-patterns-rust

↓ 13 callersMethoddevice
(&mut self)
structural/bridge/remotes/basic.rs:16
↓ 6 callersMethodadd
(&mut self, component: impl Component + 'static)
structural/composite/fs/folder.rs:16
↓ 6 callersMethoditer
Returns an iterator over a user collection. The method name may be different, however, `iter` is used as a de facto standard in a Rust naming convent
behavioral/iterator/users.rs:18
↓ 6 callersMethodroute
(&self, from: &str, to: &str)
behavioral/strategy/functional.rs:23
↓ 5 callersMethodcreate_button
(&self)
creational/abstract-factory/macos-gui/factory.rs:11
↓ 5 callersMethodhandle_request
(&mut self, url: &str, method: &str)
structural/proxy/server/nginx.rs:34
↓ 5 callersMethodpress
(&self)
creational/abstract-factory/macos-gui/button.rs:6
↓ 4 callersMethodcheck
(&self, name: &String)
structural/facade/account.rs:10
↓ 4 callersMethodcreate_checkbox
(&self)
creational/abstract-factory/macos-gui/factory.rs:15
↓ 4 callersFunctionexecute
(s: &mut Cursive, button: &'static str)
behavioral/state/main.rs:41
↓ 4 callersMethodpause
(&mut self)
behavioral/state/player.rs:53
↓ 4 callersMethodroute
(&self, from: &str, to: &str)
behavioral/strategy/conceptual.rs:34
↓ 4 callersMethodswitch
(&self)
creational/abstract-factory/macos-gui/checkbox.rs:6
↓ 3 callersMethodarrive
(&self)
behavioral/mediator/mediator-rc-refcell/trains/freight_train.rs:22
↓ 3 callersMethoddepart
(&mut self, name: &'static str)
behavioral/mediator/mediator-top-down/train_station.rs:55
↓ 3 callersFunctiondo_a_call
()
creational/singleton/how-to-create/mutex.rs:14
↓ 3 callersFunctiondo_a_call
()
creational/singleton/how-to-create/lazy.rs:19
↓ 3 callersFunctiondo_a_call
()
creational/singleton/how-to-create/once.rs:15
↓ 3 callersMethodevents
(&mut self)
behavioral/observer/editor.rs:12
↓ 3 callersFunctionexecute
Executes a command and then pushes it to a history array.
behavioral/command/main.rs:37
↓ 3 callersFunctioninto_next
Helps to wrap an object into a boxed type.
behavioral/chain-of-responsibility/department.rs:31
↓ 3 callersFunctionlog
(level: Level, message: &str)
creational/singleton/logger/log.rs:30
↓ 3 callersMethodname
(&self)
behavioral/mediator/mediator-rc-refcell/trains/freight_train.rs:18
↓ 3 callersMethodset_car_type
(&mut self, car_type: CarType)
creational/builder/builders/car.rs:22
↓ 3 callersMethodset_engine
(&mut self, engine: Engine)
creational/builder/builders/car.rs:26
↓ 3 callersMethodset_gsp_navigator
(&mut self, gps_navigator: GpsNavigator)
creational/builder/builders/car.rs:30
↓ 3 callersMethodset_seats
(&mut self, seats: u16)
creational/builder/builders/car.rs:34
↓ 3 callersMethodset_transmission
(&mut self, transmission: Transmission)
creational/builder/builders/car.rs:38
↓ 3 callersMethodset_volume
(&mut self, percent: u8)
structural/bridge/device/tv.rs:37
↓ 3 callersMethodtrack_mut
(&mut self)
behavioral/state/player.rs:65
↓ 2 callersMethodaccept
(&mut self, mut train: impl Train + 'static)
behavioral/mediator/mediator-top-down/train_station.rs:45
↓ 2 callersMethodarrive
(&mut self, mediator: &mut dyn Mediator)
behavioral/mediator/mediator-top-down/trains/freight_train.rs:19
↓ 2 callersMethodbuild
(self)
creational/builder/builders/car.rs:42
↓ 2 callersFunctioncall
Calls any object of a `Target` trait. To understand the Adapter pattern better, imagine that this is a client code, which can operate over a specific
structural/adapter/main.rs:15
↓ 2 callersMethodchannel
(&self)
structural/bridge/device/tv.rs:41
↓ 2 callersFunctionclient_code
(concrete: impl TemplateMethod)
behavioral/template-method/main.rs:55
↓ 2 callersMethoddepart
(&self)
behavioral/mediator/mediator-rc-refcell/trains/freight_train.rs:31
↓ 2 callersMethodexecute
(&mut self, patient: &mut Patient)
behavioral/chain-of-responsibility/department.rs:18
↓ 2 callersFunctioninfo
(message: &str)
creational/singleton/logger/log.rs:46
↓ 2 callersMethodload
(&mut self, path: String)
behavioral/observer/editor.rs:16
↓ 2 callersMethodmake_entry
(&mut self, account_id: &String, txn_type: String, amount: u32)
structural/facade/ledger.rs:4
↓ 2 callersMethodname
(&self)
behavioral/mediator/mediator-top-down/trains/freight_train.rs:15
↓ 2 callersMethodnotify
(&self, event_type: Event, file_path: String)
behavioral/observer/observer.rs:32
↓ 2 callersMethodnotify_about_arrival
(&self, train: &dyn Train)
behavioral/mediator/mediator-rc-refcell/train_station.rs:28
↓ 2 callersMethodnotify_about_arrival
(&mut self, train_name: &str)
behavioral/mediator/mediator-top-down/train_station.rs:19
↓ 2 callersMethodnotify_about_departure
(&self, train: &dyn Train)
behavioral/mediator/mediator-rc-refcell/train_station.rs:42
↓ 2 callersMethodnotify_about_departure
(&mut self, train_name: &str)
behavioral/mediator/mediator-top-down/train_station.rs:29
↓ 2 callersMethodparse_vec
(&self, input: Vec<i32>)
behavioral/visitor/main.rs:69
↓ 2 callersMethodplant_tree
(&mut self, x: u32, y: u32, color: TreeColor, name: String, data: String)
structural/flyweight/forest.rs:28
↓ 2 callersMethodpower
(&mut self)
structural/bridge/remotes/mod.rs:14
↓ 2 callersMethodprint_status
(&self)
structural/bridge/device/tv.rs:49
↓ 2 callersMethodregister
(&mut self, train: Rc<dyn Train>)
behavioral/mediator/mediator-rc-refcell/train_station.rs:22
↓ 2 callersFunctionrender
Renders GUI. Factory object must be passed as a parameter to such the generic function with factory invocation to utilize static dispatch.
creational/abstract-factory/app/render.rs:8
↓ 2 callersFunctionrender_dialog
(random_number: f64)
creational/simple-factory/main.rs:14
↓ 2 callersMethodrestore
(self)
behavioral/memento/conceptual.rs:23
↓ 2 callersMethodrewind
(&mut self)
behavioral/state/player.rs:57
↓ 2 callersMethodrgb
(&self)
structural/flyweight/forest/tree.rs:13
↓ 2 callersFunctionrun
The client code initializes resources and does other preparations then it uses a factory to construct and run the game.
creational/factory-method/maze-game/game.rs:22
↓ 2 callersMethodsave
Serializes an originator into a string of JSON format.
behavioral/memento/serde.rs:13
↓ 2 callersMethodsave
(&self)
behavioral/memento/conceptual.rs:11
↓ 2 callersMethodsave
(&self)
behavioral/observer/editor.rs:21
↓ 2 callersMethodset_channel
(&mut self, channel: u16)
structural/bridge/device/tv.rs:45
↓ 2 callersMethodsubscribe
(&mut self, event_type: Event, listener: Subscriber)
behavioral/observer/observer.rs:20
↓ 2 callersFunctiontest_device
(device: impl Device + Clone)
structural/bridge/main.rs:13
↓ 2 callersMethodvisit_vec
(&self, v: Vec<i32>)
behavioral/visitor/visitor.rs:18
↓ 2 callersMethodvolume
(&self)
structural/bridge/device/tv.rs:33
↓ 1 callersMethodadd_money_to_wallet
( &mut self, account_id: &String, security_code: u32, amount: u32, )
structural/facade/wallet_facade.rs:31
↓ 1 callersMethodbase_operation1
(&self)
behavioral/template-method/main.rs:12
↓ 1 callersMethodbase_operation2
(&self)
behavioral/template-method/main.rs:16
↓ 1 callersMethodbase_operation3
(&self)
behavioral/template-method/main.rs:20
↓ 1 callersMethodbuild_route
(&self, from: &str, to: &str)
behavioral/strategy/conceptual.rs:9
↓ 1 callersFunctionchange
A pure safe way to implement Singleton in Rust is using no static variables and passing everything around through function arguments. The oldest livin
creational/singleton/how-to-create/local.rs:5
↓ 1 callersMethodcheck_rate_limiting
(&mut self, url: &str)
structural/proxy/server/nginx.rs:21
↓ 1 callersFunctioncreate_button
Creates a button depending on a parameter value, it is the simple factory.
creational/simple-factory/main.rs:6
↓ 1 callersMethodcreate_button
Creates an HTML button.
creational/factory-method/render-dialog/html_gui.rs:20
↓ 1 callersMethodcredit_balance
(&mut self, amount: u32)
structural/facade/wallet.rs:10
↓ 1 callersMethoddebit_balance
(&mut self, amount: u32)
structural/facade/wallet.rs:14
↓ 1 callersMethoddeduct_money_from_wallet
( &mut self, account_id: &String, security_code: u32, amount: u32, )
structural/facade/wallet_facade.rs:46
↓ 1 callersMethoddisable
(&mut self)
structural/bridge/device/tv.rs:29
↓ 1 callersMethoddraw
(&self, canvas: &mut Canvas)
structural/flyweight/forest.rs:41
↓ 1 callersMethodenable
(&mut self)
structural/bridge/device/tv.rs:25
↓ 1 callersMethodenabled
(&self, level: &Level)
creational/singleton/logger/simple_logger.rs:8
↓ 1 callersFunctionerror
(message: &str)
creational/singleton/logger/log.rs:38
↓ 1 callersMethodexecute
(&mut self, app: &mut Cursive)
behavioral/command/command/cut.rs:12
↓ 1 callersMethodhandle
(&mut self, patient: &mut Patient)
behavioral/chain-of-responsibility/department/doctor.rs:16
↓ 1 callersMethodhook1
(&self)
behavioral/template-method/main.rs:24
↓ 1 callersMethodhook2
(&self)
behavioral/template-method/main.rs:25
↓ 1 callersFunctioninit
(max_level: Level)
creational/singleton/logger/simple_logger.rs:17
↓ 1 callersFunctioninitialize
()
creational/factory-method/render-dialog/init.rs:5
↓ 1 callersMethodis_enabled
(&self)
structural/bridge/device/tv.rs:21
↓ 1 callersMethodlog
(&self, level: &Level, message: &str)
creational/singleton/logger/simple_logger.rs:12
↓ 1 callersMethodmute
(&mut self)
structural/bridge/remotes/advanced.rs:14
↓ 1 callersMethodnext
(&mut self)
behavioral/chain-of-responsibility/department/doctor.rs:25
↓ 1 callersMethodnext
(self: Box<Self>, player: &mut Player)
behavioral/state/state.rs:98
↓ 1 callersMethodnext_track
(&mut self)
behavioral/state/player.rs:41
↓ 1 callersMethodon_click
(&self)
creational/factory-method/render-dialog/html_gui.rs:11
↓ 1 callersMethodon_click
(&self)
creational/factory-method/render-dialog/windows_gui.rs:11
↓ 1 callersMethodparse_str
(&self, input: &str)
behavioral/visitor/main.rs:48
↓ 1 callersMethodplay
(&mut self)
behavioral/state/player.rs:49
↓ 1 callersMethodplay
(&self)
creational/factory-method/maze-game/game.rs:13
next →1–100 of 277, ranked by callers