MsgPack binds the body string into the struct. Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode).
(out any)
| 376 | // MsgPack binds the body string into the struct. |
| 377 | // Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode). |
| 378 | func (b *Bind) MsgPack(out any) error { |
| 379 | bind := binder.GetFromThePool[*binder.MsgPackBinding](&binder.MsgPackBinderPool) |
| 380 | bind.MsgPackDecoder = b.ctx.App().Config().MsgPackDecoder |
| 381 | |
| 382 | defer releasePooledBinder(&binder.MsgPackBinderPool, bind) |
| 383 | |
| 384 | if err := b.returnBindErr(bind.Bind(b.ctx.Body(), out), BindSourceBody); err != nil { |
| 385 | return err |
| 386 | } |
| 387 | |
| 388 | return b.validateStruct(out) |
| 389 | } |
| 390 | |
| 391 | // Body binds the request body into the struct, map[string]string and map[string][]string. |
| 392 | // Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode). |
no test coverage detected