CBOR binds the body string into the struct. Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode).
(out any)
| 315 | // CBOR binds the body string into the struct. |
| 316 | // Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode). |
| 317 | func (b *Bind) CBOR(out any) error { |
| 318 | bind := binder.GetFromThePool[*binder.CBORBinding](&binder.CBORBinderPool) |
| 319 | bind.CBORDecoder = b.ctx.App().Config().CBORDecoder |
| 320 | |
| 321 | defer releasePooledBinder(&binder.CBORBinderPool, bind) |
| 322 | |
| 323 | if err := b.returnBindErr(bind.Bind(b.ctx.Body(), out), BindSourceBody); err != nil { |
| 324 | return err |
| 325 | } |
| 326 | return b.validateStruct(out) |
| 327 | } |
| 328 | |
| 329 | // XML binds the body string into the struct. |
| 330 | // Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode). |
no test coverage detected