Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 76 for MarshalTo (0.17 sec)

  1. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go

    	if m == nil || m.Time.IsZero() {
    		return nil, nil
    	}
    	return m.ProtoMicroTime().Marshal()
    }
    
    // MarshalTo implements the protobuf marshalling interface.
    func (m *MicroTime) MarshalTo(data []byte) (int, error) {
    	if m == nil || m.Time.IsZero() {
    		return 0, nil
    	}
    	return m.ProtoMicroTime().MarshalTo(data)
    }
    
    // MarshalToSizedBuffer implements the protobuf marshalling interface.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 02 08:21:04 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/runtime/types_proto.go

    			}
    		} else {
    			i -= int(size)
    			n1, err := b.MarshalTo(data[i:])
    			if err != nil {
    				return 0, err
    			}
    			if uint64(n1) != size {
    				// programmer error: the Size() method for protobuf does not match the results of MarshalTo, which means the proto
    				// struct returned would be wrong.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 25 18:54:00 UTC 2019
    - 2.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_proto_test.go

    	}
    	for _, testCase := range table {
    		q := MustParse(testCase.quantity)
    		// Won't currently get an error as MarshalTo can't return one
    		result, _ := q.Marshal()
    		q.MarshalTo(result)
    		if q.Cmp(testCase.expect) != 0 {
    			t.Errorf("Expected: %v, Actual: %v", testCase.expect, q)
    		}
    	}
    	// Test when i is {0,0}
    	table2 := []struct {
    		dec    *inf.Dec
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 25 07:12:11 UTC 2017
    - 3.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time_proto.go

    	if m == nil || m.Time.IsZero() {
    		return nil, nil
    	}
    	return m.ProtoTime().Marshal()
    }
    
    // MarshalTo implements the protobuf marshaling interface.
    func (m *Time) MarshalTo(data []byte) (int, error) {
    	if m == nil || m.Time.IsZero() {
    		return 0, nil
    	}
    	return m.ProtoTime().MarshalTo(data)
    }
    
    // MarshalToSizedBuffer implements the protobuf reverse marshaling interface.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 25 18:54:00 UTC 2019
    - 3.3K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go

    		// this path performs a single allocation during write only when the Allocator wasn't provided
    		// it also requires the caller to implement the more efficient Size and MarshalTo methods
    		encodedSize := uint64(t.Size())
    		data := memAlloc.Allocate(encodedSize)
    
    		n, err := t.MarshalTo(data)
    		if err != nil {
    			return err
    		}
    		_, err = w.Write(data[:n])
    		return err
    
    	case proto.Marshaler:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 23 13:38:23 UTC 2022
    - 17.8K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go

    	data = make([]byte, size)
    	n, err := m.MarshalToSizedBuffer(data[:size])
    	if err != nil {
    		return nil, err
    	}
    	return data[:n], nil
    }
    
    // MarshalTo is a customized version of the generated Protobuf unmarshaler for a struct
    // with a single string field.
    func (m *Quantity) MarshalTo(data []byte) (int, error) {
    	size := m.Size()
    	return m.MarshalToSizedBuffer(data[:size])
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 21 05:31:33 UTC 2021
    - 6K bytes
    - Viewed (0)
  7. staging/src/k8s.io/api/networking/v1/generated.pb.go

    	size := m.Size()
    	dAtA = make([]byte, size)
    	n, err := m.MarshalToSizedBuffer(dAtA[:size])
    	if err != nil {
    		return nil, err
    	}
    	return dAtA[:n], nil
    }
    
    func (m *HTTPIngressPath) MarshalTo(dAtA []byte) (int, error) {
    	size := m.Size()
    	return m.MarshalToSizedBuffer(dAtA[:size])
    }
    
    func (m *HTTPIngressPath) MarshalToSizedBuffer(dAtA []byte) (int, error) {
    	i := len(dAtA)
    	_ = i
    	var l int
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:37 UTC 2024
    - 158.2K bytes
    - Viewed (0)
  8. staging/src/k8s.io/api/flowcontrol/v1beta3/generated.pb.go

    	size := m.Size()
    	dAtA = make([]byte, size)
    	n, err := m.MarshalToSizedBuffer(dAtA[:size])
    	if err != nil {
    		return nil, err
    	}
    	return dAtA[:n], nil
    }
    
    func (m *ExemptPriorityLevelConfiguration) MarshalTo(dAtA []byte) (int, error) {
    	size := m.Size()
    	return m.MarshalToSizedBuffer(dAtA[:size])
    }
    
    func (m *ExemptPriorityLevelConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
    	i := len(dAtA)
    	_ = i
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:37 UTC 2024
    - 141.9K bytes
    - Viewed (0)
  9. staging/src/k8s.io/api/flowcontrol/v1/generated.pb.go

    	size := m.Size()
    	dAtA = make([]byte, size)
    	n, err := m.MarshalToSizedBuffer(dAtA[:size])
    	if err != nil {
    		return nil, err
    	}
    	return dAtA[:n], nil
    }
    
    func (m *ExemptPriorityLevelConfiguration) MarshalTo(dAtA []byte) (int, error) {
    	size := m.Size()
    	return m.MarshalToSizedBuffer(dAtA[:size])
    }
    
    func (m *ExemptPriorityLevelConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
    	i := len(dAtA)
    	_ = i
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:37 UTC 2024
    - 141.8K bytes
    - Viewed (0)
  10. staging/src/k8s.io/api/authentication/v1/generated.pb.go

    	size := m.Size()
    	dAtA = make([]byte, size)
    	n, err := m.MarshalToSizedBuffer(dAtA[:size])
    	if err != nil {
    		return nil, err
    	}
    	return dAtA[:n], nil
    }
    
    func (m *BoundObjectReference) MarshalTo(dAtA []byte) (int, error) {
    	size := m.Size()
    	return m.MarshalToSizedBuffer(dAtA[:size])
    }
    
    func (m *BoundObjectReference) MarshalToSizedBuffer(dAtA []byte) (int, error) {
    	i := len(dAtA)
    	_ = i
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:37 UTC 2024
    - 72K bytes
    - Viewed (0)
Back to top