Home
last modified time | relevance | path

Searched refs:T (Results 1 – 25 of 39) sorted by relevance

12

/smoltcp-0.9.1/src/wire/
Dpretty_print.rs94 pub struct PrettyPrinter<'a, T: PrettyPrint> {
97 phantom: PhantomData<T>,
100 impl<'a, T: PrettyPrint> PrettyPrinter<'a, T> {
102 pub fn new(prefix: &'static str, buffer: &'a dyn AsRef<[u8]>) -> PrettyPrinter<'a, T> { in new() argument
111 impl<'a, T: PrettyPrint + AsRef<[u8]>> PrettyPrinter<'a, T> {
113 pub fn print(printable: &'a T) -> PrettyPrinter<'a, T> { in print() argument
122 impl<'a, T: PrettyPrint> fmt::Display for PrettyPrinter<'a, T> {
124 T::pretty_print(&self.buffer, f, &mut PrettyIndent::new(self.prefix)) in fmt()
Dudp.rs12 pub struct Packet<T: AsRef<[u8]>> {
13 buffer: T,
34 impl<T: AsRef<[u8]>> Packet<T> {
36 pub const fn new_unchecked(buffer: T) -> Packet<T> { in new_unchecked() argument
44 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() argument
73 pub fn into_inner(self) -> T { in into_inner() argument
134 impl<'a, T: AsRef<[u8]> + ?Sized> Packet<&'a T> {
144 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
203 impl<T: AsRef<[u8]>> AsRef<[u8]> for Packet<T> {
219 pub fn parse<T>( in parse()
[all …]
Dipv6hopbyhop.rs10 pub struct Header<T: AsRef<[u8]>> {
11 buffer: T,
51 impl<T: AsRef<[u8]>> Header<T> {
53 pub const fn new_unchecked(buffer: T) -> Header<T> { in new_unchecked() argument
61 pub fn new_checked(buffer: T) -> Result<Header<T>> { in new_checked() argument
91 pub fn into_inner(self) -> T { in into_inner() argument
111 impl<'a, T: AsRef<[u8]> + ?Sized> Header<&'a T> {
120 impl<T: AsRef<[u8]> + AsMut<[u8]>> Header<T> {
137 impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> Header<&'a mut T> {
147 impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Header<&'a T> {
[all …]
Dndiscoption.rs53 pub struct NdiscOption<T: AsRef<[u8]>> {
54 buffer: T,
146 impl<T: AsRef<[u8]>> NdiscOption<T> {
148 pub const fn new_unchecked(buffer: T) -> NdiscOption<T> { in new_unchecked() argument
156 pub fn new_checked(buffer: T) -> Result<NdiscOption<T>> { in new_checked() argument
197 pub fn into_inner(self) -> T { in into_inner() argument
217 impl<T: AsRef<[u8]>> NdiscOption<T> {
228 impl<T: AsRef<[u8]>> NdiscOption<T> {
238 impl<T: AsRef<[u8]>> NdiscOption<T> {
273 impl<'a, T: AsRef<[u8]> + ?Sized> NdiscOption<&'a T> {
[all …]
Dethernet.rs85 pub struct Frame<T: AsRef<[u8]>> {
86 buffer: T,
101 impl<T: AsRef<[u8]>> Frame<T> {
103 pub const fn new_unchecked(buffer: T) -> Frame<T> { in new_unchecked() argument
111 pub fn new_checked(buffer: T) -> Result<Frame<T>> { in new_checked() argument
129 pub fn into_inner(self) -> T { in into_inner() argument
167 impl<'a, T: AsRef<[u8]> + ?Sized> Frame<&'a T> {
176 impl<T: AsRef<[u8]> + AsMut<[u8]>> Frame<T> {
206 impl<T: AsRef<[u8]>> AsRef<[u8]> for Frame<T> {
212 impl<T: AsRef<[u8]>> fmt::Display for Frame<T> {
[all …]
Dipv6fragment.rs11 pub struct Header<T: AsRef<[u8]>> {
12 buffer: T,
37 impl<T: AsRef<[u8]>> Header<T> {
39 pub const fn new_unchecked(buffer: T) -> Header<T> { in new_unchecked() argument
47 pub fn new_checked(buffer: T) -> Result<Header<T>> { in new_checked() argument
67 pub fn into_inner(self) -> T { in into_inner() argument
100 impl<T: AsRef<[u8]> + AsMut<[u8]>> Header<T> {
148 impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Header<&'a T> {
177 pub fn parse<T>(header: &Header<&T>) -> Result<Repr> in parse()
179 T: AsRef<[u8]> + ?Sized, in parse()
[all …]
Dmld.rs40 impl<T: AsRef<[u8]>> Packet<T> {
88 impl<T: AsRef<[u8]>> Packet<T> {
101 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
158 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
170 pub struct AddressRecord<T: AsRef<[u8]>> {
171 buffer: T,
174 impl<T: AsRef<[u8]>> AddressRecord<T> {
176 pub const fn new_unchecked(buffer: T) -> Self { in new_unchecked()
184 pub fn new_checked(buffer: T) -> Result<Self> { in new_checked()
202 pub fn into_inner(self) -> T { in into_inner() argument
[all …]
Digmp.rs27 pub struct Packet<T: AsRef<[u8]>> {
28 buffer: T,
55 impl<T: AsRef<[u8]>> Packet<T> {
57 pub const fn new_unchecked(buffer: T) -> Packet<T> { in new_unchecked() argument
65 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() argument
83 pub fn into_inner(self) -> T { in into_inner() argument
132 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
204 pub fn parse<T>(packet: &Packet<&T>) -> Result<Repr> in parse()
206 T: AsRef<[u8]> + ?Sized, in parse()
255 pub fn emit<T>(&self, packet: &mut Packet<&mut T>) in emit()
[all …]
Dipv6routing.rs55 pub struct Header<T: AsRef<[u8]>> {
56 buffer: T,
144 impl<T: AsRef<[u8]>> Header<T> {
146 pub const fn new(buffer: T) -> Header<T> { in new() argument
154 pub fn new_checked(buffer: T) -> Result<Header<T>> { in new_checked() argument
187 pub fn into_inner(self) -> T { in into_inner() argument
222 impl<T: AsRef<[u8]>> Header<T> {
234 impl<T: AsRef<[u8]>> Header<T> {
273 impl<T: AsRef<[u8]> + AsMut<[u8]>> Header<T> {
331 impl<T: AsRef<[u8]> + AsMut<[u8]>> Header<T> {
[all …]
Darp.rs26 pub struct Packet<T: AsRef<[u8]>> {
27 buffer: T,
66 impl<T: AsRef<[u8]>> Packet<T> {
68 pub const fn new_unchecked(buffer: T) -> Packet<T> { in new_unchecked() argument
76 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() argument
103 pub fn into_inner(self) -> T { in into_inner() argument
170 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
247 impl<T: AsRef<[u8]>> AsRef<[u8]> for Packet<T> {
273 pub fn parse<T: AsRef<[u8]>>(packet: &Packet<T>) -> Result<Repr> { in parse()
299 pub fn emit<T: AsRef<[u8]> + AsMut<[u8]>>(&self, packet: &mut Packet<T>) { in emit() argument
[all …]
Dicmpv4.rs166 pub struct Packet<T: AsRef<[u8]>> {
167 buffer: T,
185 impl<T: AsRef<[u8]>> Packet<T> {
187 pub const fn new_unchecked(buffer: T) -> Packet<T> { in new_unchecked() argument
195 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() argument
217 pub fn into_inner(self) -> T { in into_inner() argument
287 impl<'a, T: AsRef<[u8]> + ?Sized> Packet<&'a T> {
296 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
349 impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> Packet<&'a mut T> {
359 impl<T: AsRef<[u8]>> AsRef<[u8]> for Packet<T> {
[all …]
Dipv6option.rs62 pub struct Ipv6Option<T: AsRef<[u8]>> {
63 buffer: T,
89 impl<T: AsRef<[u8]>> Ipv6Option<T> {
91 pub const fn new_unchecked(buffer: T) -> Ipv6Option<T> { in new_unchecked() argument
99 pub fn new_checked(buffer: T) -> Result<Ipv6Option<T>> { in new_checked() argument
137 pub fn into_inner(self) -> T { in into_inner() argument
159 impl<'a, T: AsRef<[u8]> + ?Sized> Ipv6Option<&'a T> {
172 impl<T: AsRef<[u8]> + AsMut<[u8]>> Ipv6Option<T> {
191 impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> Ipv6Option<&'a mut T> {
204 impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Ipv6Option<&'a T> {
[all …]
Dsixlowpan.rs250 pub struct Packet<T: AsRef<[u8]>> {
251 buffer: T,
269 impl<T: AsRef<[u8]>> Packet<T> {
271 pub const fn new_unchecked(buffer: T) -> Self { in new_unchecked()
279 pub fn new_checked(buffer: T) -> Result<Self> { in new_checked()
314 pub fn into_inner(self) -> T { in into_inner() argument
364 impl<'a, T: AsRef<[u8]> + ?Sized> Packet<&'a T> {
381 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
416 pub fn parse<T: AsRef<[u8]>>(packet: &Packet<T>) -> Result<Self> { in parse()
440 pub fn emit<T: AsRef<[u8]> + AsMut<[u8]>>(&self, packet: &mut Packet<T>) { in emit() argument
[all …]
Dndisc.rs33 impl<T: AsRef<[u8]>> Packet<T> {
76 impl<T: AsRef<[u8]>> Packet<T> {
89 impl<T: AsRef<[u8]>> Packet<T> {
102 impl<T: AsRef<[u8]>> Packet<T> {
115 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
157 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
170 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
182 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
229 pub fn parse<T>(packet: &Packet<&'a T>) -> Result<Repr<'a>> in parse()
231 T: AsRef<[u8]> + ?Sized, in parse()
[all …]
Dicmpv6.rs188 pub struct Packet<T: AsRef<[u8]>> {
189 pub(super) buffer: T,
248 impl<T: AsRef<[u8]>> Packet<T> {
250 pub const fn new_unchecked(buffer: T) -> Packet<T> { in new_unchecked() argument
258 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() argument
276 pub fn into_inner(self) -> T { in into_inner() argument
371 impl<'a, T: AsRef<[u8]> + ?Sized> Packet<&'a T> {
380 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
493 impl<T: AsRef<[u8]>> AsRef<[u8]> for Packet<T> {
543 pub fn parse<T>( in parse()
[all …]
Dipv6.rs390 pub struct Packet<T: AsRef<[u8]>> {
391 buffer: T,
442 impl<T: AsRef<[u8]>> Packet<T> {
445 pub const fn new_unchecked(buffer: T) -> Packet<T> { in new_unchecked() argument
454 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() argument
478 pub fn into_inner(self) -> T { in into_inner() argument
553 impl<'a, T: AsRef<[u8]> + ?Sized> Packet<&'a T> {
563 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
638 impl<'a, T: AsRef<[u8]> + ?Sized> fmt::Display for Packet<&'a T> {
650 impl<T: AsRef<[u8]>> AsRef<[u8]> for Packet<T> {
[all …]
Dipv4.rs284 pub struct Packet<T: AsRef<[u8]>> {
285 buffer: T,
305 impl<T: AsRef<[u8]>> Packet<T> {
307 pub const fn new_unchecked(buffer: T) -> Packet<T> { in new_unchecked() argument
315 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() argument
348 pub fn into_inner(self) -> T { in into_inner() argument
472 impl<'a, T: AsRef<[u8]> + ?Sized> Packet<&'a T> {
482 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
613 impl<T: AsRef<[u8]>> AsRef<[u8]> for Packet<T> {
632 pub fn parse<T: AsRef<[u8]> + ?Sized>( in parse() argument
[all …]
Dieee802154.rs195 pub struct Frame<T: AsRef<[u8]>> {
196 buffer: T,
232 impl<T: AsRef<[u8]>> Frame<T> {
234 pub const fn new_unchecked(buffer: T) -> Frame<T> { in new_unchecked() argument
242 pub fn new_checked(buffer: T) -> Result<Frame<T>> { in new_checked() argument
283 pub fn into_inner(self) -> T { in into_inner() argument
578 impl<'a, T: AsRef<[u8]> + ?Sized> Frame<&'a T> {
594 impl<T: AsRef<[u8]> + AsMut<[u8]>> Frame<T> {
739 impl<T: AsRef<[u8]>> fmt::Display for Frame<T> {
773 pub fn parse<T: AsRef<[u8]> + ?Sized>(packet: &Frame<&T>) -> Result<Repr> { in parse()
[all …]
Dtcp.rs72 pub struct Packet<T: AsRef<[u8]>> {
73 buffer: T,
114 impl<T: AsRef<[u8]>> Packet<T> {
116 pub const fn new_unchecked(buffer: T) -> Packet<T> { in new_unchecked() argument
124 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() argument
153 pub fn into_inner(self) -> T { in into_inner() argument
350 impl<'a, T: AsRef<[u8]> + ?Sized> Packet<&'a T> {
368 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
587 impl<T: AsRef<[u8]>> AsRef<[u8]> for Packet<T> {
791 pub fn parse<T>( in parse()
[all …]
Ddhcpv4.rs116 pub struct Packet<T: AsRef<[u8]>> {
117 buffer: T,
234 impl<T: AsRef<[u8]>> Packet<T> {
236 pub const fn new_unchecked(buffer: T) -> Packet<T> { in new_unchecked() argument
244 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() argument
264 pub fn into_inner(self) -> T { in into_inner() argument
420 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
534 impl<'a, T: AsRef<[u8]> + AsMut<[u8]> + ?Sized> Packet<&'a mut T> {
706 pub fn parse<T>(packet: &'a Packet<&'a T>) -> Result<Self> in parse()
708 T: AsRef<[u8]> + ?Sized, in parse()
[all …]
Ddns.rs80 pub struct Packet<T: AsRef<[u8]>> {
81 buffer: T,
84 impl<T: AsRef<[u8]>> Packet<T> {
86 pub const fn new_unchecked(buffer: T) -> Packet<T> { in new_unchecked() argument
94 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() argument
113 pub fn into_inner(self) -> T { in into_inner() argument
213 impl<T: AsRef<[u8]> + AsMut<[u8]>> Packet<T> {
420 pub fn emit<T: ?Sized>(&self, packet: &mut Packet<&mut T>) in emit()
422 T: AsRef<[u8]> + AsMut<[u8]>, in emit()
/smoltcp-0.9.1/src/storage/
Dring_buffer.rs27 pub struct RingBuffer<'a, T: 'a> {
28 storage: ManagedSlice<'a, T>,
33 impl<'a, T: 'a> RingBuffer<'a, T> {
37 pub fn new<S>(storage: S) -> RingBuffer<'a, T> in new()
39 S: Into<ManagedSlice<'a, T>>, in new() argument
62 T: Resettable, in reset()
116 impl<'a, T: 'a> RingBuffer<'a, T> {
121 F: FnOnce(&'b mut T) -> Result<R, E>, in enqueue_one_with()
139 pub fn enqueue_one(&mut self) -> Result<&mut T, Full> { in enqueue_one() argument
147 F: FnOnce(&'b mut T) -> Result<R, E>, in dequeue_one_with()
[all …]
/smoltcp-0.9.1/src/iface/
Dsocket_set.rs60 pub fn add<T: AnySocket<'a>>(&mut self, socket: T) -> SocketHandle { in add()
96 pub fn get<T: AnySocket<'a>>(&self, handle: SocketHandle) -> &T { in get() argument
99 T::downcast(&item.socket).expect("handle refers to a socket of a wrong type") in get()
110 pub fn get_mut<T: AnySocket<'a>>(&mut self, handle: SocketHandle) -> &mut T { in get_mut() argument
112 Some(item) => T::downcast_mut(&mut item.socket) in get_mut()
/smoltcp-0.9.1/src/iface/interface/
Digmp.rs25 pub fn join_multicast_group<D, T: Into<IpAddress>>( in join_multicast_group()
28 addr: T, in join_multicast_group() argument
73 pub fn leave_multicast_group<D, T: Into<IpAddress>>( in leave_multicast_group()
76 addr: T, in leave_multicast_group() argument
112 pub fn has_multicast_group<T: Into<IpAddress>>(&self, addr: T) -> bool { in has_multicast_group()
196 pub fn has_multicast_group<T: Into<IpAddress>>(&self, addr: T) -> bool { in has_multicast_group()
/smoltcp-0.9.1/src/
Dtime.rs34 pub fn from_micros<T: Into<i64>>(micros: T) -> Instant { in from_micros()
45 pub fn from_millis<T: Into<i64>>(millis: T) -> Instant { in from_millis()
59 pub fn from_secs<T: Into<i64>>(secs: T) -> Instant { in from_secs()

12