Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 104 for type$val (0.17 sec)

  1. staging/src/k8s.io/apiserver/pkg/cel/ip.go

    }
    
    // ConvertToType implements ref.Val.ConvertToType.
    func (d IP) ConvertToType(typeVal ref.Type) ref.Val {
    	switch typeVal {
    	case IPType:
    		return d
    	case types.TypeType:
    		return IPType
    	case types.StringType:
    		return types.String(d.Addr.String())
    	}
    	return types.NewErr("type conversion error from '%s' to '%s'", IPType, typeVal)
    }
    
    // Equal implements ref.Val.Equal.
    func (d IP) Equal(other ref.Val) ref.Val {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 11:02:33 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/lazy/lazy.go

    // Only its own type and "Type" type are allowed.
    func (m *MapValue) ConvertToType(typeVal ref.Type) ref.Val {
    	switch typeVal {
    	case m.typeValue:
    		return m
    	case types.TypeType:
    		return m.typeValue
    	}
    	return types.NewErr("disallowed conversion from %q to %q", m.typeValue.TypeName(), typeVal.TypeName())
    }
    
    // Equal returns true if the other object is the same pointer-wise.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 23 21:31:27 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  3. src/debug/elf/elf.go

    	Align  uint32 /* Alignment in memory and file. */
    }
    
    // ELF32 Dynamic structure. The ".dynamic" section contains an array of them.
    type Dyn32 struct {
    	Tag int32  /* Entry type. */
    	Val uint32 /* Integer/Address value. */
    }
    
    // ELF32 Compression header.
    type Chdr32 struct {
    	Type      uint32
    	Size      uint32
    	Addralign uint32
    }
    
    /*
     * Relocation entries.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 16 00:01:16 UTC 2024
    - 134.6K bytes
    - Viewed (0)
  4. fastapi/types.py

    import types
    from enum import Enum
    from typing import Any, Callable, Dict, Set, Type, TypeVar, Union
    
    from pydantic import BaseModel
    
    DecoratedCallable = TypeVar("DecoratedCallable", bound=Callable[..., Any])
    UnionType = getattr(types, "UnionType", Union)
    ModelNameMap = Dict[Union[Type[BaseModel], Type[Enum]], str]
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Dec 12 00:29:03 UTC 2023
    - 383 bytes
    - Viewed (0)
  5. tests/test_generic_parameterless_depends.py

    from typing import TypeVar
    
    from fastapi import Depends, FastAPI
    from fastapi.testclient import TestClient
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    T = TypeVar("T")
    
    Dep = Annotated[T, Depends()]
    
    
    class A:
        pass
    
    
    class B:
        pass
    
    
    @app.get("/a")
    async def a(dep: Dep[A]):
        return {"cls": dep.__class__.__name__}
    
    
    @app.get("/b")
    async def b(dep: Dep[B]):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Apr 02 02:52:56 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  6. fastapi/concurrency.py

    from typing import AsyncGenerator, ContextManager, TypeVar
    
    import anyio
    from anyio import CapacityLimiter
    from starlette.concurrency import iterate_in_threadpool as iterate_in_threadpool  # noqa
    from starlette.concurrency import run_in_threadpool as run_in_threadpool  # noqa
    from starlette.concurrency import (  # noqa
        run_until_first_complete as run_until_first_complete,
    )
    
    _T = TypeVar("_T")
    
    
    @asynccontextmanager
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Mon Dec 25 17:57:35 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/internal/analysisutil/util.go

    func HasSideEffects(info *types.Info, e ast.Expr) bool {
    	safe := true
    	ast.Inspect(e, func(node ast.Node) bool {
    		switch n := node.(type) {
    		case *ast.CallExpr:
    			typVal := info.Types[n.Fun]
    			switch {
    			case typVal.IsType():
    				// Type conversion, which is safe.
    			case typVal.IsBuiltin():
    				// Builtin func, conservatively assumed to not
    				// be safe for now.
    				safe = false
    				return false
    			default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types/type.go

    // instantiated generic types.
    func (t *Type) IsFullyInstantiated() bool {
    	return len(t.RParams()) > 0
    }
    
    // Map contains Type fields specific to maps.
    type Map struct {
    	Key  *Type // Key type
    	Elem *Type // Val (elem) type
    
    	Bucket *Type // internal struct type representing a hash bucket
    }
    
    // MapType returns t's extra map-specific fields.
    func (t *Type) MapType() *Map {
    	t.wantEtype(TMAP)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 49.5K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/cel/library/authz.go

    }
    
    // ConvertToType implements ref.Val.ConvertToType.
    func (a receiverOnlyObjectVal) ConvertToType(typeVal ref.Type) ref.Val {
    	switch typeVal {
    	case a.typeValue:
    		return a
    	case types.TypeType:
    		return a.typeValue
    	}
    	return types.NewErr("type conversion error from '%s' to '%s'", a.typeValue, typeVal)
    }
    
    // Equal implements ref.Val.Equal.
    func (a receiverOnlyObjectVal) Equal(other ref.Val) ref.Val {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 23 21:31:27 UTC 2023
    - 21.1K bytes
    - Viewed (0)
  10. fastapi/datastructures.py

    from typing import (
        Any,
        BinaryIO,
        Callable,
        Dict,
        Iterable,
        Optional,
        Type,
        TypeVar,
        cast,
    )
    
    from fastapi._compat import (
        PYDANTIC_V2,
        CoreSchema,
        GetJsonSchemaHandler,
        JsonSchemaValue,
        with_info_plain_validator_function,
    )
    from starlette.datastructures import URL as URL  # noqa: F401
    from starlette.datastructures import Address as Address  # noqa: F401
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Apr 02 02:48:51 UTC 2024
    - 5.6K bytes
    - Viewed (1)
Back to top